Class AndMatcher<T extends Key<?>>

  • All Implemented Interfaces:
    java.io.Serializable, Matcher<T>

    public class AndMatcher<T extends Key<?>>
    extends java.lang.Object
    implements Matcher<T>
    Matches using an AND operator on two Matcher operands.
    Author:
    jhouse
    See Also:
    Serialized Form
    • Field Detail

      • leftOperand

        protected Matcher<T extends Key<?>> leftOperand
      • rightOperand

        protected Matcher<T extends Key<?>> rightOperand
    • Constructor Detail

      • AndMatcher

        protected AndMatcher​(Matcher<T> leftOperand,
                             Matcher<T> rightOperand)
    • Method Detail

      • and

        public static <U extends Key<?>> AndMatcher<U> and​(Matcher<U> leftOperand,
                                                           Matcher<U> rightOperand)
        Create an AndMatcher that depends upon the result of both of the given matchers.
      • isMatch

        public boolean isMatch​(T key)
        Specified by:
        isMatch in interface Matcher<T extends Key<?>>
      • getLeftOperand

        public Matcher<T> getLeftOperand()
      • getRightOperand

        public Matcher<T> getRightOperand()
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface Matcher<T extends Key<?>>
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface Matcher<T extends Key<?>>
        Overrides:
        equals in class java.lang.Object