Package com.fasterxml.aalto.util
Class EmptyIterator<T>
java.lang.Object
com.fasterxml.aalto.util.EmptyIterator<T>
- All Implemented Interfaces:
Iterator<T>
Simple implementation of "null iterator", iterator that has nothing to
iterate over.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> EmptyIterator
<T> Since the actual type has no effect (as this iterator never returns any value objects), we can just cast away here: bit unclean, but safe.boolean
hasNext()
next()
void
remove()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
sInstance
-
-
Constructor Details
-
EmptyIterator
private EmptyIterator()
-
-
Method Details
-
getInstance
Since the actual type has no effect (as this iterator never returns any value objects), we can just cast away here: bit unclean, but safe. -
hasNext
public boolean hasNext() -
next
-
remove
public void remove()
-