|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.caf.common.SearchTools
public class SearchTools
Utility class for searching through a map based on an input that is either regular or regex.
Field Summary | |
---|---|
protected static Map |
regexPatternCache
|
Constructor Summary | |
---|---|
SearchTools()
|
Method Summary | |
---|---|
static Pattern |
buildPatternForTerm(String term)
Convert the search term to a regex pattern. |
static Pattern |
buildPatternForTerm(String term,
int flags)
Convert the search term to a regex pattern. |
static String |
buildRegExForTerm(String term)
Convert the search term to a regex string. |
static List |
buildRegExForTerms(List terms)
Convert the search term list to a list of regex patterns. |
static List |
buildRegExForTerms(List terms,
int flags)
Convert the search term list to a list of regex patterns. |
static boolean |
matchesAllRegExPatterns(String value,
List patternList)
Check if the given string matches all the regex patterns in the pattern list |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Map regexPatternCache
Constructor Detail |
---|
public SearchTools()
Method Detail |
---|
public static List buildRegExForTerms(List terms)
terms
- list of search terms
public static List buildRegExForTerms(List terms, int flags)
terms
- list of search termsflags
- flags to use for the pattern object
public static String buildRegExForTerm(String term)
term
- the search term
public static Pattern buildPatternForTerm(String term)
term
- the search term
public static Pattern buildPatternForTerm(String term, int flags)
term
- the search termflags
- flags to use for the pattern object
public static boolean matchesAllRegExPatterns(String value, List patternList)
value
- the string to match againstpatternList
- the list of regex patterns to match
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |