Class IteratorOf<X>

  • Type Parameters:
    X - Type of item
    All Implemented Interfaces:
    Iterator<X>

    public final class IteratorOf<X>
    extends Object
    implements Iterator<X>
    Iterator that returns the elements.

    There is no thread-safety guarantee.

    Since:
    0.30
    • Constructor Detail

      • IteratorOf

        @SafeVarargs
        public IteratorOf​(X... items)
        Ctor.
        Parameters:
        items - Items to iterate
    • Method Detail

      • hasNext

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

        public X next()
        Specified by:
        next in interface Iterator<X>