Class LikePattern


  • public class LikePattern
    extends java.lang.Object
    Performs string matching for SQL LIKE patterns.
    • Constructor Summary

      Constructors 
      Constructor Description
      LikePattern()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean matches​(java.lang.String likePattern, java.lang.String escape, java.lang.CharSequence input)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_ESCAPE_STRING

        public static final java.lang.String DEFAULT_ESCAPE_STRING
        See Also:
        Constant Field Values
    • Constructor Detail

      • LikePattern

        public LikePattern()
    • Method Detail

      • matches

        public static boolean matches​(java.lang.String likePattern,
                                      java.lang.String escape,
                                      java.lang.CharSequence input)
        Parameters:
        likePattern - an SQL LIKE pattern including % and _ characters.
        escape - SQL ESCAPE character, or empty string for no escaping.
        input - string to be matched.
        Returns:
        true if input string matches LIKE pattern.