Class CachedListRandomIterator<S>

  • Type Parameters:
    S - Selection type, for example a Move class, an entity class or a value class.
    All Implemented Interfaces:
    Iterator<S>

    public class CachedListRandomIterator<S>
    extends SelectionIterator<S>
    This Iterator does not shuffle and is never ending.
    • Field Detail

      • cachedList

        protected final List<S> cachedList
      • workingRandom

        protected final Random workingRandom
      • empty

        protected final boolean empty
    • Constructor Detail

      • CachedListRandomIterator

        public CachedListRandomIterator​(List<S> cachedList,
                                        Random workingRandom)
    • Method Detail

      • hasNext

        public boolean hasNext()
      • next

        public S next()