|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.freecompany.util.text.Scanner
public class Scanner
Locates individual characters and sequences of characters within a block of characters.
This class utilizes the CharSequence
interface for scan targets, allowing a wide
array of container objects to be searched.
Constructor Summary | |
---|---|
Scanner()
|
Method Summary | |
---|---|
protected static int |
end(java.lang.CharSequence target,
java.lang.CharSequence sequence)
|
static boolean |
endsWith(java.lang.CharSequence target,
java.lang.CharSequence sequence)
Convenience method that scans in order to determine if the token is the last set of characters in the target. |
static int |
last(java.lang.CharSequence target,
java.lang.CharSequence sequence)
Convenience method that reverse scans an entire target. |
static boolean |
match(java.lang.CharSequence target,
java.lang.CharSequence sequence,
int start)
Convenience method that matches the portion of the sequence from the provided index to the end. |
static boolean |
match(java.lang.CharSequence target,
java.lang.CharSequence sequence,
int start,
int end)
Matches the provided sequence against the target at the indicated index. |
static int |
scan(java.lang.CharSequence target,
java.lang.CharSequence sequence)
Convenience method that scans between the start and the end of the target. |
static int |
scan(java.lang.CharSequence target,
java.lang.CharSequence sequence,
int start)
Convenience method which scans between the provided index and the end of the target. |
static int |
scan(java.lang.CharSequence target,
java.lang.CharSequence sequence,
int start,
int end)
Scans the provided target sequence for the whole of the provided sequence occurring between the start and end indexes. |
static int |
scan(State state,
java.lang.CharSequence sequence)
Scans for the next occurance of the provided sequence starting at the index stored in the internal counter. |
static int |
skip(java.lang.CharSequence target,
java.lang.CharSequence sequence)
Skips a sequence using the default index of zero, meaning this method only searches the beginning of a sequence for a particular match. |
static int |
skip(java.lang.CharSequence target,
java.lang.CharSequence sequence,
int index)
Skips a sequence if and only if it is found at the given index. |
static boolean |
skip(State state,
java.lang.CharSequence sequence)
Skips a sequence if it is present at the cursor. |
static boolean |
startsWith(java.lang.CharSequence target,
java.lang.CharSequence sequence)
Convenience method that scans in order to determine if the token is the first set of characters in the target. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Scanner()
Method Detail |
---|
public static final int scan(State state, java.lang.CharSequence sequence)
public static final boolean skip(State state, java.lang.CharSequence sequence)
public static final boolean startsWith(java.lang.CharSequence target, java.lang.CharSequence sequence)
public static final boolean endsWith(java.lang.CharSequence target, java.lang.CharSequence sequence)
public static final int last(java.lang.CharSequence target, java.lang.CharSequence sequence)
scan
with the start and end arguments reversed.
public static final int scan(java.lang.CharSequence target, java.lang.CharSequence sequence)
scan
with zero as the third argument and the length of the sequence subtracted
from the length of the target as the fourth argument.
public static final int scan(java.lang.CharSequence target, java.lang.CharSequence sequence, int start)
scan
method with the length of the sequence subtracted from the length of the target
as the fourth argument.
public static final int scan(java.lang.CharSequence target, java.lang.CharSequence sequence, int start, int end)
public static final int skip(java.lang.CharSequence target, java.lang.CharSequence sequence)
public static final int skip(java.lang.CharSequence target, java.lang.CharSequence sequence, int index)
public static final boolean match(java.lang.CharSequence target, java.lang.CharSequence sequence, int start)
match
method with the length of the sequence added to the start
index as the fourth argument.
public static final boolean match(java.lang.CharSequence target, java.lang.CharSequence sequence, int start, int end)
protected static final int end(java.lang.CharSequence target, java.lang.CharSequence sequence)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |