public class CharSequenceWordFinder extends AbstractWordFinder
| Constructor and Description |
|---|
CharSequenceWordFinder(CharSequence text) |
CharSequenceWordFinder(CharSequence text,
WordTokenizer tokenizer) |
| Modifier and Type | Method and Description |
|---|---|
protected Word |
findFirstWord() |
CharSequence |
getCharSequence() |
WordTokenizer |
getTokenizer() |
protected Word |
next(Word currentWord)
Find the next Word of the iteration.
|
protected void |
replace(String newWord,
Word currentWord)
This method throw a UnsupportedOperationException because a String is
inmutable object.
|
protected void |
setTokenizer(WordTokenizer tokenizer) |
protected void |
updateCharSequence(int start,
int end,
int cause) |
current, hasCurrent, hasNext, init, init, next, replacepublic CharSequenceWordFinder(CharSequence text, WordTokenizer tokenizer)
public CharSequenceWordFinder(CharSequence text)
protected Word next(Word currentWord)
AbstractWordFindernext in class AbstractWordFindercurrentWord - Current interation word. It can be null if the first iteration.protected void replace(String newWord, Word currentWord)
replace in class AbstractWordFindernewWord - The new string for the current word.currentWord - The current word.public WordTokenizer getTokenizer()
protected void setTokenizer(WordTokenizer tokenizer)
protected void updateCharSequence(int start,
int end,
int cause)
public CharSequence getCharSequence()
protected Word findFirstWord()
Copyright © 2020. All rights reserved.