Class StringSetMatch


  • public class StringSetMatch
    extends java.lang.Object
    Matches a string against a set of predefined values. Value set is defined using a String containing a comma separated value list. Heading an trailing whitespace on the values is ignored in matching.
    Author:
    rak
    • Constructor Summary

      Constructors 
      Constructor Description
      StringSetMatch​(java.lang.String strings)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      boolean isEmpty()  
      boolean match​(java.lang.String string)
      Returns true if the given string is contained in the value set.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • StringSetMatch

        public StringSetMatch​(java.lang.String strings)
        Constructor.
        Parameters:
        strings - comma-separated list of Strings
    • Method Detail

      • hashCode

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

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

        public boolean isEmpty()
      • match

        public boolean match​(java.lang.String string)
        Returns true if the given string is contained in the value set.
        Parameters:
        string -
        Returns:
        true if the given string is contained in the value set
      • toString

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