|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandyr.jtokeniser.Tokeniser
public abstract class Tokeniser
Tokeniser
is an abstract base class for a variety of Tokeniser
s.
Field Summary | |
---|---|
protected int |
currentTokenPosition
|
protected java.util.List |
tokens
|
Constructor Summary | |
---|---|
protected |
Tokeniser()
|
Method Summary | |
---|---|
int |
countTokens()
Calculates the number of times that this tokeniser's nextToken method can be called before it generates an
exception. |
java.util.List |
getTokens()
Returns a List of string tokens. |
boolean |
hasMoreTokens()
Tests if there are more tokens available from this tokeniser's string. |
java.lang.String |
nextToken()
Returns the next token from this tokeniser. |
int |
numberOfTokens()
Returns the total number of tokens that were extracted when tokenising the input. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List tokens
protected int currentTokenPosition
Constructor Detail |
---|
protected Tokeniser()
Method Detail |
---|
public int countTokens()
nextToken
method can be called before it generates an
exception.
public int numberOfTokens()
public boolean hasMoreTokens()
true
, then a subsequent call to
nextToken
will successfully return a token.
true
if and only if there is at least one token in the string
after the current position; false
otherwise.public java.lang.String nextToken() throws java.util.NoSuchElementException
java.util.NoSuchElementException
- if there are no more tokens in this tokeniser's string.public java.util.List getTokens()
List
of string tokens.
List
of string tokens.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |