org.relique.jdbc.csv
Class LikePattern

java.lang.Object
  extended by org.relique.jdbc.csv.LikePattern

public class LikePattern
extends Object

Performs string matching for SQL LIKE patterns.


Field Summary
static String DEFAULT_ESCAPE_STRING
           
 
Constructor Summary
LikePattern()
           
 
Method Summary
static boolean matches(String likePattern, String escape, 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 String DEFAULT_ESCAPE_STRING
See Also:
Constant Field Values
Constructor Detail

LikePattern

public LikePattern()
Method Detail

matches

public static boolean matches(String likePattern,
                              String escape,
                              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.


Copyright © 2016. All rights reserved.