Class AbstractTokenIterator
java.lang.Object
com.twelvemonkeys.util.AbstractTokenIterator
- All Implemented Interfaces:
TokenIterator, Enumeration<String>, Iterator<String>
- Direct Known Subclasses:
RegExTokenIterator, StringTokenIterator
Abstract base class for
TokenIterators to extend.- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/util/AbstractTokenIterator.java#1 $
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Enumeration
asIteratorMethods inherited from interface Iterator
forEachRemaining, hasNext, nextMethods inherited from interface TokenIterator
reset
-
Constructor Details
-
AbstractTokenIterator
public AbstractTokenIterator()
-
-
Method Details
-
remove
public void remove()Not supported.- Specified by:
removein interfaceIterator<String>- Throws:
UnsupportedOperationException-removeis not supported by this Iterator.
-
hasMoreTokens
public final boolean hasMoreTokens()- Specified by:
hasMoreTokensin interfaceTokenIterator
-
nextToken
Returns the next element in the iteration as aString. This implementation simply returns(String) next().- Specified by:
nextTokenin interfaceTokenIterator- Returns:
- the next element in the iteration.
- Throws:
NoSuchElementException- iteration has no more elements.- See Also:
-
hasMoreElements
public final boolean hasMoreElements()This implementation simply returnshasNext().- Specified by:
hasMoreElementsin interfaceEnumeration<String>- See Also:
-
nextElement
This implementation simply returnsnext().- Specified by:
nextElementin interfaceEnumeration<String>- See Also:
-