|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.topologi.diffx.load.text.TextTokeniserNoSpace
A tokeniser for text events that ignore and does not preserve whitespaces.
This tokeniser works at the word level, and will essetially prune out all the white spaces from the text to return only a list of successive words.
| Constructor Summary | |
TextTokeniserNoSpace(CharSequence cs)
Creates a new tokeniser. |
|
| Method Summary | |
int |
countTokens()
Calculates the number of times that this tokenizer's nextToken method can be
called before it generates an exception. |
TextEvent |
nextToken()
Returns the following token. |
void |
useRepertory(Repertory rep)
Specifies a repertory to use for this tokeniser. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TextTokeniserNoSpace(CharSequence cs)
throws NullPointerException
cs - The character sequence to tokenise.
NullPointerException - If the specified character sequence is null.| Method Detail |
public int countTokens()
nextToken method can be
called before it generates an exception.
countTokens in interface TextTokeniser
public TextEvent nextToken()
throws NoSuchElementException
nextToken in interface TextTokeniserNoSuchElementException - If the last token has already been returned.public void useRepertory(Repertory rep)
useRepertory in interface TextTokeniserrep - The repertory to use.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||