Class ElementMatcher.Junction.Disjunction<W>

    • Field Detail

      • left

        private final ElementMatcher<? super W> left
        The element matchers that constitute this disjunction.
      • right

        private final ElementMatcher<? super W> right
        The element matchers that constitute this disjunction.
    • Constructor Detail

      • Disjunction

        public Disjunction​(ElementMatcher<? super W> left,
                           ElementMatcher<? super W> right)
        Creates a new disjunction matcher.
        Parameters:
        left - The first matcher to consult for a match.
        right - The second matcher to consult for a match. This matcher is only consulted if the first matcher did not already constitute a match.
    • Method Detail

      • matches

        public boolean matches​(W target)
        Matches a target against this element matcher.
        Parameters:
        target - The instance to be matched.
        Returns:
        true if the given element is matched by this matcher or false otherwise.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object