|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ls.util.text.WildcardString
Implementation of the UN*X wildcards in Java. So they are available in a portable way and can be used whereever needed.
Scans a set of characters and returns false if the set mismatches at this position in the teststring and true if
it is matching wildcard is set to the closing ] and test is unmodified if mismatched and otherwise the char
pointer is pointing to the next character
scans an asterisk
Constructor Summary | |
WildcardString()
Simple constructor |
|
WildcardString(String wildcardPar,
String testPar)
Constructor |
Method Summary | |
boolean |
areMatching(String wildcardPar,
String testPar)
Retrieves the result of matching |
boolean |
areMatching(String wildcardPar,
String testPar,
boolean caseDep)
Retrieves the result of matching |
boolean |
areNotMatching(String wildcardPar,
String testPar)
Retrieves the result of "not matching" function |
boolean |
areNotMatching(String wildcardPar,
String testPar,
boolean caseDep)
Retrieves the result of "not matching" function |
boolean |
getResult()
Retrieves the result |
void |
setTest(String testPar)
set test test |
void |
setWildcard(String wildcardPar)
set wildcard test |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WildcardString(String wildcardPar, String testPar)
wildcardPar
- wildcard stringtestPar
- test string2public WildcardString()
Method Detail |
public void setWildcard(String wildcardPar)
wildcardPar
- wildcard string contains the rule for testingpublic void setTest(String testPar)
testPar
- test string to be testedpublic boolean getResult()
public boolean areMatching(String wildcardPar, String testPar)
wildcardPar
- wildcard string contains the rule for testingtestPar
- test string to be testedpublic boolean areMatching(String wildcardPar, String testPar, boolean caseDep)
wildcardPar
- wildcard string contains the rule for testingtestPar
- test string to be testedcaseDep
- define if the comparison will be case dependentpublic boolean areNotMatching(String wildcardPar, String testPar)
wildcardPar
- wildcard string contains the rule for testingtestPar
- test string to be testedpublic boolean areNotMatching(String wildcardPar, String testPar, boolean caseDep)
wildcardPar
- wildcard string contains the rule for testingtestPar
- test string to be testedcaseDep
- define if the comparison will be case dependent
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |