|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.core.clientserver.search.SystemNonRegexMatcher
A string pattern matcher, suppporting * and ? wildcards.
Nested Class Summary | |
---|---|
static class |
SystemNonRegexMatcher.Position
|
Field Summary | |
---|---|
protected int |
fBound
|
protected boolean |
fHasLeadingStar
|
protected boolean |
fHasTrailingStar
|
protected boolean |
fIgnoreCase
|
protected boolean |
fIgnoreWildCards
|
protected int |
fLength
|
protected String |
fPattern
|
protected String[] |
fSegments
|
protected static char |
fSingleWildCard
|
Constructor Summary | |
---|---|
SystemNonRegexMatcher(String pattern,
boolean ignoreCase,
boolean ignoreWildCards)
StringMatcher constructor takes in a String object that is a simple pattern which may contain '*' for 0 and many characters and '?' |
Method Summary | |
---|---|
SystemNonRegexMatcher.Position |
find(String text,
int start,
int end)
Find the first occurrence of the pattern between start end(exclusive). |
boolean |
match(String text)
match the given text with the pattern |
boolean |
match(String text,
int start,
int end)
Given the starting (inclusive) and the ending (exclusive) positions in the text , determine if the given substring matches with aPattern |
protected int |
posIn(String text,
int start,
int end)
|
protected int |
regExpPosIn(String text,
int start,
int end,
String p)
|
protected boolean |
regExpRegionMatches(String text,
int tStart,
String p,
int pStart,
int plen)
|
protected int |
textPosIn(String text,
int start,
int end,
String p)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String fPattern
protected int fLength
protected boolean fIgnoreWildCards
protected boolean fIgnoreCase
protected boolean fHasLeadingStar
protected boolean fHasTrailingStar
protected String[] fSegments
protected int fBound
protected static final char fSingleWildCard
Constructor Detail |
public SystemNonRegexMatcher(String pattern, boolean ignoreCase, boolean ignoreWildCards)
pattern
- the pattern to match text againstignoreCase
- if true, case is ignoredignoreWildCards
- if true, wild cards and their escape sequences are ignored
(everything is taken literally).Method Detail |
public SystemNonRegexMatcher.Position find(String text, int start, int end)
start
end(exclusive).
StringMatcher.Position
object that keeps the starting
(inclusive) and ending positions (exclusive) of the first occurrence of the
pattern in the specified range of the text; return null if not found or subtext
is empty (start==end). A pair of zeros is returned if pattern is empty string
Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"
is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returnedpublic boolean match(String text)
text
with the pattern
public boolean match(String text, int start, int end)
text
, determine if the given substring matches with aPattern
protected int posIn(String text, int start, int end)
protected int regExpPosIn(String text, int start, int end, String p)
protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen)
protected int textPosIn(String text, int start, int end, String p)
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |