net.sf.sfac.string
Class ReaderCharIterator

java.lang.Object
  extended by net.sf.sfac.string.ReaderCharIterator
All Implemented Interfaces:
CharIterator

public class ReaderCharIterator
extends Object
implements CharIterator

Char iterator fetching chars from a simple string.


Constructor Summary
ReaderCharIterator(Reader rdr)
           
 
Method Summary
 String getNormalizedString()
          Get the content of this char iterator as a normalized string.
 long getProcessedCharCount()
           
 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.
 void setData(Reader rdr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReaderCharIterator

public ReaderCharIterator(Reader rdr)
Method Detail

setData

public void setData(Reader rdr)

getNormalizedString

public String getNormalizedString()
Description copied from interface: CharIterator
Get the content of this char iterator as a normalized string.
The result will be:

Specified by:
getNormalizedString in interface CharIterator
Returns:
The content of this char iterator as a normalized string.

nextChar

public char nextChar()
Description copied from interface: CharIterator
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.

Specified by:
nextChar in interface CharIterator
Returns:
the next char of this iterator or '\0' if no more characters are availbale.

nextNormalizedChar

public char nextNormalizedChar()
Description copied from interface: CharIterator
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.

Specified by:
nextNormalizedChar in interface CharIterator
Returns:
the next char of this iterator or '\0' if no more characters are availbale.

getProcessedCharCount

public long getProcessedCharCount()

reset

public void reset()
Description copied from interface: CharIterator
Reset the internal pointer of this iterator to the first char.

Specified by:
reset in interface CharIterator


Copyright © 2012. All Rights Reserved.