Class RandomOrderIterator<T>

    • Constructor Detail

      • RandomOrderIterator

        public RandomOrderIterator​(int sz,
                                   java.util.Iterator<T> base)
        Wrap the base iterator, randomizing with a buffer of length sz.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Description copied from class: WrappedIterator
        hasNext: defer to the base iterator
        Specified by:
        hasNext in interface java.util.Iterator<T>
        Overrides:
        hasNext in class WrappedIterator<T>
      • next

        public T next()
        Description copied from class: WrappedIterator
        next: defer to the base iterator
        Specified by:
        next in interface java.util.Iterator<T>
        Overrides:
        next in class WrappedIterator<T>
      • remove

        public void remove()
        Description copied from class: WrappedIterator
        if .remove() is allowed, delegate to the base iterator's .remove; otherwise, throw an UnsupportedOperationException.
        Specified by:
        remove in interface java.util.Iterator<T>
        Overrides:
        remove in class WrappedIterator<T>