org.objectweb.dream.util
Class EmptyIterator<T>
java.lang.Object
org.objectweb.dream.util.EmptyIterator<T>
- Type Parameters:
T
- type of objects, over which empty iterator iterates (:-)
)
- All Implemented Interfaces:
- Iterator<T>
public final class EmptyIterator<T>
- extends Object
- implements Iterator<T>
An empty iterator implementation. The hasNext()
method always
returns false
. The constructor is private. As a consequence,
only one instance of this class exists, and can be referenced using the
INSTANCE
constant.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final EmptyIterator INSTANCE
- A constant instance of
EmptyIterator
EMPTY_STRING_ITERATOR
public static final Iterator<String> EMPTY_STRING_ITERATOR
- A constant instance of
EmptyIterator<String>
EmptyIterator
public EmptyIterator()
- default constructor.
remove
public void remove()
- Specified by:
remove
in interface Iterator<T>
- See Also:
Iterator.remove()
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<T>
- See Also:
Iterator.hasNext()
next
public T next()
- Specified by:
next
in interface Iterator<T>
- See Also:
Iterator.next()
Copyright © 2003, 2005 - INRIA Rhone-Alpes - All Rights Reserved.