Package com.tangosol.util
Class NullImplementation.NullEnumerator
java.lang.Object
com.tangosol.util.NullImplementation.NullEnumerator
- All Implemented Interfaces:
 Iterable,Enumeration,Iterator
- Enclosing class:
 NullImplementation
public static class NullImplementation.NullEnumerator
extends Object
implements Enumeration, Iterator, Iterable
An empty enumerator.
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NullImplementation.NullEnumeratorSince the enumerator contains no information, only one ever has to exist. - 
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this enumeration contains more elements.booleanhasNext()Returns true if the iteration has more elements.iterator()Returns an Iterator instance with no values to enumerate.next()Returns the next element in the interation.Returns the next element of this enumeration if this enumeration object has at least one more element to provide.voidremove()Removes from the underlying Collection the last element returned by the Iterator .Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Enumeration
asIteratorMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining 
- 
Field Details
- 
INSTANCE
Since the enumerator contains no information, only one ever has to exist. 
 - 
 - 
Method Details
- 
hasMoreElements
public boolean hasMoreElements()Tests if this enumeration contains more elements.- Specified by:
 hasMoreElementsin interfaceEnumeration- Returns:
 - false
 
 - 
nextElement
Returns the next element of this enumeration if this enumeration object has at least one more element to provide.- Specified by:
 nextElementin interfaceEnumeration- Returns:
 - the next element of this enumeration.
 - Throws:
 NoSuchElementException- always
 - 
hasNext
public boolean hasNext()Returns true if the iteration has more elements. - 
next
Returns the next element in the interation.- Specified by:
 nextin interfaceIterator- Throws:
 NoSuchElementException- iteration has no more elements.
 - 
remove
public void remove()Removes from the underlying Collection the last element returned by the Iterator . This method can be called only once per call to next The behavior of an Iterator is unspecified if the underlying Collection is modified while the iteration is in progress in any way other than by calling this method. Optional operation.- Specified by:
 removein interfaceIterator- Throws:
 IllegalStateException- next has not yet been called, or remove has already been called after the last call to next.
 - 
iterator
Returns an Iterator instance with no values to enumerate. 
 -