Class KeyMatcher<T extends Key<?>>

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

    public class KeyMatcher<T extends Key<?>>
    extends java.lang.Object
    implements Matcher<T>
    Matches on the complete key being equal (both name and group).
    Author:
    jhouse
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected T compareTo  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected KeyMatcher​(T compareTo)  
    • Field Detail

      • compareTo

        protected T extends Key<?> compareTo
    • Constructor Detail

      • KeyMatcher

        protected KeyMatcher​(T compareTo)
    • Method Detail

      • keyEquals

        public static <U extends Key<?>> KeyMatcher<U> keyEquals​(U compareTo)
        Create a KeyMatcher that matches Keys that equal the given key.
      • isMatch

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

        public T getCompareToValue()
      • 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