|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sfac.string.AbstractCharIterator
public abstract class AbstractCharIterator
Abstract implementation of a CharIterator where the chars are found in a set of Strings.
The way the string are stored/organized is defined by the concrete subclass (implementing getFirstString() and
getNextString()).
Rem: Subclasses have to call reset() in their constructor to correctly initialize the iterator state.
| Constructor Summary | |
|---|---|
AbstractCharIterator()
|
|
| Method Summary | |
|---|---|
protected abstract String |
getFirstString()
Get the first String available for iteration. |
protected abstract String |
getNextString()
Get the next String available for iteration. |
String |
getNormalizedString()
Get the content of this char iterator as a normalized string. |
protected boolean |
isFinished()
|
char |
nextChar()
Get the next non-normalised char. |
char |
nextNormalizedChar()
Get the next char of this iterator. |
void |
reset()
Reset the iterator state so it points to it's first char. |
protected void |
setFinished()
Notify this class that no more character are available. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractCharIterator()
| Method Detail |
|---|
public void reset()
reset in interface CharIteratorprotected abstract String getFirstString()
protected abstract String getNextString()
setFinished() (then the return value is
ignored).
protected void setFinished()
protected boolean isFinished()
public char nextNormalizedChar()
CharIterator interface javadoc comment. When no more characters
are available, an zero char ('\0') is returned.
nextNormalizedChar in interface CharIteratorpublic char nextChar()
getNextString().
nextChar in interface CharIteratorpublic String getNormalizedString()
getNormalizedString in interface CharIterator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||