Class SingletonCloseableIterator<T>

  • All Implemented Interfaces:
    com.mysema.commons.lang.CloseableIterator<T>, Closeable, AutoCloseable, Iterator<T>

    public class SingletonCloseableIterator<T>
    extends Object
    implements com.mysema.commons.lang.CloseableIterator<T>
    A CloseableIterator with a single element
    • Constructor Detail

      • SingletonCloseableIterator

        public SingletonCloseableIterator​(T value)
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface com.mysema.commons.lang.CloseableIterator<T>
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator<T>
      • next

        public T next()
        Specified by:
        next in interface Iterator<T>
      • remove

        public void remove()
        Specified by:
        remove in interface Iterator<T>