net.sf.sfac.string
Interface CharIterator

All Known Implementing Classes:
AbstractCharIterator, ReaderCharIterator, StringCharIterator

public interface CharIterator

Char iterator: Iterate on the characted of any kind of character source.
The iterator can normalize the returned characters. The method returning normalized and non-normalized chars can be mixed in a iteration.

Author:
Olivier Berlanger

Method Summary
 String getNormalizedString()
          Get the content of this char iterator as a normalized string.
 char nextChar()
          Get the next char of this iterator.
 char nextNormalizedChar()
          Get the next char of this iterator.
 void reset()
          Reset the internal pointer of this iterator to the first char.
 

Method Detail

reset

void reset()
Reset the internal pointer of this iterator to the first char.


nextChar

char nextChar()
Get the next char of this iterator.
The returned char are not normalized. When no more characters are available, an zero char ('\0') is returned.

Returns:
the next char of this iterator or '\0' if no more characters are availbale.

nextNormalizedChar

char nextNormalizedChar()
Get the next char of this iterator.
The chars returned by this method are normalized as following: When no more characters are available, an zero char ('\0') is returned.

Returns:
the next char of this iterator or '\0' if no more characters are availbale.

getNormalizedString

String getNormalizedString()
Get the content of this char iterator as a normalized string.
The result will be:

Returns:
The content of this char iterator as a normalized string.


Copyright © 2012. All Rights Reserved.