Class NullCloseableIterator<T>
- java.lang.Object
-
- com.identityworksllc.iiq.common.iterators.NullCloseableIterator<T>
-
- Type Parameters:
T
- The type being wrapped
- All Implemented Interfaces:
sailpoint.tools.CloseableIterator<T>
public class NullCloseableIterator<T> extends Object implements sailpoint.tools.CloseableIterator<T>
An implementation of CloseableIterator that always contains no items.The hasNext() method will always return false and the next() method will always throw a
NoSuchElementException
.
-
-
Constructor Summary
Constructors Constructor Description NullCloseableIterator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static <S> NullCloseableIterator<S>
getInstance()
Returns a static singleton instance of NullCloseableIterator.boolean
hasNext()
T
next()
-
-
-
Constructor Detail
-
NullCloseableIterator
public NullCloseableIterator()
-
-
Method Detail
-
getInstance
public static <S> NullCloseableIterator<S> getInstance()
Returns a static singleton instance of NullCloseableIterator.Since this class actually does nothing, this object is thread safe.
- Type Parameters:
S
- The type expected (which is irrelevant here)- Returns:
- The singleton iterator
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacesailpoint.tools.CloseableIterator<T>
-
-