net.sf.mmm.util.lang.api
Interface CharIterator

All Known Implementing Classes:
AbstractCharIterator, NodeValueCharIterator, SequenceCharIterator, SpaceNormalizingCharIterator

public interface CharIterator

This is the interface for an Iterator of primitive char values.
The intention of CharIterator is to allow faster processing of large streams of characters by using the primitive type char and by making calls of hasNext() unnecessary.

Since:
1.0.2
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
static char END_OF_ITERATOR
          This is a character that is illegal according to the unicode specification.
 
Method Summary
 boolean hasNext()
          This method determines whether there is a next char available or the end of this iterator has been reached.
 char next()
          This method returns the next character to iterate or END_OF_ITERATOR if the end of this iterator has been reached.
 

Field Detail

END_OF_ITERATOR

static final char END_OF_ITERATOR
This is a character that is illegal according to the unicode specification. It is used to indicate that this iterator has reached its end.

See Also:
Constant Field Values
Method Detail

hasNext

boolean hasNext()
This method determines whether there is a next char available or the end of this iterator has been reached.

Returns:
true if there is at least one next char available, or false if the end of this iterator has been reached and further calls of next() will return END_OF_ITERATOR.
See Also:
next(), Iterator.hasNext()

next

char next()
This method returns the next character to iterate or END_OF_ITERATOR if the end of this iterator has been reached. If END_OF_ITERATOR is returned further calls will always return END_OF_ITERATOR.

Returns:
the next character or END_OF_ITERATOR if the end of this iterator has been reached.
See Also:
Iterator.next()


Copyright © 2001-2010 mmm-Team. All Rights Reserved.