|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ujac.util.text.SimplePatternMatcher
public class SimplePatternMatcher
Name: SimplePatternMatcher
Description: A simple pattern matcher implementation.
This implementation allows patterns, beginning with a
wildcard ('*'), ends with a wildcard or both of each.
In case no wild card is defined, tested texts have to
exactly match the pattern.
Nested Class Summary | |
---|---|
class |
SimplePatternMatcher.PatternDefinition
Name: PatternDefinition Description: Defines a pattern. |
Field Summary | |
---|---|
static int |
MODE_ENDS_WITH
Constant for exact match mode. |
static int |
MODE_EXACT
Constant for exact match mode. |
static int |
MODE_INBETWEEN
Constant for exact match mode. |
static int |
MODE_STARTS_WITH
Constant for exact match mode. |
Constructor Summary | |
---|---|
SimplePatternMatcher(String pattern)
Constructs a PatternMatcher instance with specific attributes. |
Method Summary | |
---|---|
boolean |
matches(String text)
Test whether the given text matches the pattern. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MODE_EXACT
public static final int MODE_ENDS_WITH
public static final int MODE_STARTS_WITH
public static final int MODE_INBETWEEN
Constructor Detail |
---|
public SimplePatternMatcher(String pattern)
pattern
- The pattern to match.Method Detail |
---|
public boolean matches(String text)
matches
in interface PatternMatcher
text
- The text to test.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |