Class 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.

    • 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
      • close

        public void close()
        Specified by:
        close in interface sailpoint.tools.CloseableIterator<T>
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface sailpoint.tools.CloseableIterator<T>
      • next

        public T next()
        Specified by:
        next in interface sailpoint.tools.CloseableIterator<T>