Class ShuffleIterator<T>

  • Type Parameters:
    T - the type parameter
    All Implemented Interfaces:
    Iterator<T>

    public class ShuffleIterator<T>
    extends Object
    implements Iterator<T>
    The type Shuffle iterator.
    • Constructor Detail

      • ShuffleIterator

        public ShuffleIterator​(Iterator<T> backing)
        Instantiates a new Shuffle iterator.
        Parameters:
        backing - the backing
      • ShuffleIterator

        public ShuffleIterator​(@NonNull
                               @NonNull Iterator<T> backing,
                               @NonNull
                               @NonNull Random random)
    • Method Detail

      • hasNext

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

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