org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.utils
Class FilterUtil
java.lang.Object
org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.utils.FilterUtil
public class FilterUtil
- extends java.lang.Object
Util Class for Filter
- Author:
- Wan Hui
Method Summary |
static boolean |
isMatch(java.lang.String pattern,
java.lang.String value)
Checks the whether the value matches the pattern casesensitive and not ignore wildcards *
This util method takes in a String object that is a simple
pattern which may contain '*' for 0 and many characters and
'?' for exactly one character. |
static boolean |
isMatch(java.lang.String pattern,
java.lang.String value,
boolean ignoreCase,
boolean ignoreWildCards)
This util method takes in a String object that is a simple
pattern which may contain '*' for 0 and many characters and
'?' for exactly one character. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilterUtil
public FilterUtil()
isMatch
public static boolean isMatch(java.lang.String pattern,
java.lang.String value)
- Checks the whether the value matches the pattern casesensitive and not ignore wildcards *
This util method takes in a String object that is a simple
pattern which may contain '*' for 0 and many characters and
'?' for exactly one character.
Literal '*' and '?' characters must be escaped in the pattern
e.g., "\*" means literal "*", etc.
Escaping any other character (including the escape character itself),
just results in that character in the pattern.
e.g., "\a" means "a" and "\\" means "\"
If invoking the StringMatcher with string literals in Java, don't forget
escape characters are represented by "\\".
- Parameters:
pattern
- the pattern to match text againstvalue
- the value to be matched
- Returns:
isMatch
public static boolean isMatch(java.lang.String pattern,
java.lang.String value,
boolean ignoreCase,
boolean ignoreWildCards)
- This util method takes in a String object that is a simple
pattern which may contain '*' for 0 and many characters and
'?' for exactly one character.
Literal '*' and '?' characters must be escaped in the pattern
e.g., "\*" means literal "*", etc.
Escaping any other character (including the escape character itself),
just results in that character in the pattern.
e.g., "\a" means "a" and "\\" means "\"
If invoking the StringMatcher with string literals in Java, don't forget
escape characters are represented by "\\".
- Parameters:
pattern
- the pattern to match text againstvalue
- the value to be matchedignoreCase
- if true, case is ignoredignoreWildCards
- if true, wild cards and their escape sequences are ignored
(everything is taken literally).
- Returns: