Class EmptyIterator<T>
- java.lang.Object
-
- com.saperion.common.lang.iterator.EmptyIterator<T>
-
- Type Parameters:
T- formal type of objects to iterate
- All Implemented Interfaces:
java.util.Iterator<T>
public final class EmptyIterator<T> extends java.lang.Object implements java.util.Iterator<T>An empty
Iteratorthat iterates through no elements.Use
getInstance()to get an instance.This instance can be used in several threads concurrently.
- Author:
- agz
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> EmptyIterator<T>getInstance()Returns an instance ofEmptyIterator.booleanhasNext()Tnext()voidremove()java.lang.StringtoString()
-
-
-
Method Detail
-
getInstance
public static <T> EmptyIterator<T> getInstance()
Returns an instance ofEmptyIterator.- Type Parameters:
T- formal type of objects to iterate- Returns:
- an instance of
EmptyIterator
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<T>
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator<T>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-