Class SingletonIterator<T>

  • All Implemented Interfaces:
    java.util.Iterator<T>

    public class SingletonIterator<T>
    extends java.lang.Object
    implements java.util.Iterator<T>
    Simple read-only iterator that iterators over one specific item, passed in as constructor argument.
    • Constructor Detail

      • SingletonIterator

        @Deprecated
        public SingletonIterator​(T value)
        Deprecated.
    • Method Detail

      • hasNext

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

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

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