|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.util.StringPattern
public abstract class StringPattern
Provide a standard mechanism for defining pattern searches within Strings.
Nested Class Summary | ||
---|---|---|
static class |
StringPattern.Match
Holds the results of a successful match examination within a string-pattern. |
Constructor Summary | ||
---|---|---|
StringPattern()
Creates a new StringPattern object. |
Method Summary | ||
---|---|---|
boolean |
findMatch(AbstractString str,
int beginIndex,
int curIndex,
int maxIndex,
StringPattern.Match match)
Find sub-string (within sub-string) at cursor position that matches pattern stored in this string-pattern. |
|
abstract boolean |
findMatch(AbstractString str,
int beginIndex,
int maxIndex,
StringPattern.Match match)
Find next sub-string (within sub-string) that matches pattern stored in this string-pattern. |
|
boolean |
findMatch(AbstractString str,
int beginIndex,
StringPattern.Match match)
Find next sub-string that matches pattern stored in this string-pattern. |
|
protected static boolean |
isWhitespace(char c)
Determines if the supplied character should be considered white space. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringPattern()
Method Detail |
---|
public boolean findMatch(AbstractString str, int beginIndex, StringPattern.Match match)
This method looks for a sub-string match between your beginning index
position and the last character of the provided string. If str
is null, this method returns false.
str
- String to search.beginIndex
- First character in string to examine.match
- Match object to contain the complete match information.
public abstract boolean findMatch(AbstractString str, int beginIndex, int maxIndex, StringPattern.Match match)
This method looks for a sub-string match between your "boundary"
index positions within the provided string. If str
is null, this
method returns false.
str
- String to search.beginIndex
- First character in string to examine.maxIndex
- Last character in string to examine.match
- Match object to contain the complete match information.
public boolean findMatch(AbstractString str, int beginIndex, int curIndex, int maxIndex, StringPattern.Match match)
This method looks for a sub-string match containing the cursor position
between your "boundary" index positions within the provided string. If
str
is null, this method returns false.
This method should be implemented by an extending class.
In the absence of an overriding implementation, false
is returned.
str
- String to search.beginIndex
- First character in string to examine.curIndex
- Cursor position in string to examine.maxIndex
- Last character in string to examine.match
- Match object to contain the complete match information.
protected static final boolean isWhitespace(char c)
This method considers as white space characters: newlines, carriage returns, tabs, non-breaking spaces, zero-width spaces, CJK spaces, and spaces.
Sub-classes may override this method to provide a wider (or more restricted) class of white-space characters.
c
- Character to test.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal