Class EmptyIterator<T>
- java.lang.Object
-
- uk.gov.gchq.gaffer.commonutil.iterable.EmptyIterator<T>
-
- Type Parameters:
T
- the type of items in the iterator.
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterator<T>
public class EmptyIterator<T> extends Object implements Closeable, Iterator<T>
AnEmptyCloseableIterator
is aCloseable
Iterator
which contains no objects. This is achieved by forcing theIterator.hasNext()
method to always return false.
-
-
Constructor Summary
Constructors Constructor Description EmptyIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
hasNext()
T
next()
void
remove()
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-