Class CachedListRandomIterator<S>
- java.lang.Object
-
- org.optaplanner.core.impl.heuristic.selector.common.iterator.SelectionIterator<S>
-
- org.optaplanner.core.impl.heuristic.selector.common.iterator.CachedListRandomIterator<S>
-
- Type Parameters:
S
- Selection type, for example aMove
class, an entity class or a value class.
- All Implemented Interfaces:
Iterator<S>
public class CachedListRandomIterator<S> extends SelectionIterator<S>
ThisIterator
does not shuffle and is never ending.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<S>
cachedList
protected boolean
empty
protected Random
workingRandom
-
Constructor Summary
Constructors Constructor Description CachedListRandomIterator(List<S> cachedList, Random workingRandom)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
S
next()
-
Methods inherited from class org.optaplanner.core.impl.heuristic.selector.common.iterator.SelectionIterator
remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
next
public S next()
-
-