Class Matcher<T>

    • Method Detail

      • getValue

        public abstract T getValue()
        Gets the value of the set matcher variant.
        Returns:
        Returns the set variant's value.
      • getMemberName

        public abstract java.lang.String getMemberName()
        Gets the member name of the matcher.
        Returns:
        Returns the set member name.
      • accept

        public abstract <U> U accept​(Matcher.Visitor<U> visitor)
        Visits the Matcher union type.
        Type Parameters:
        U - The type returned by the visitor.
        Parameters:
        visitor - Visitor to apply.
        Returns:
        Returns the return value of the visitor.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public final boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • fromNode

        public static Matcher<?> fromNode​(Node node)
        Creates a Matcher from a Node.
        Parameters:
        node - Node to create a Matcher from.
        Returns:
        Returns the create Matcher.
        Throws:
        ExpectationNotMetException - if the given node is invalid.