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 aMoveclass, an entity class or a value class.
- All Implemented Interfaces:
Iterator<S>
public class CachedListRandomIterator<S> extends SelectionIterator<S>
ThisIteratordoes not shuffle and is never ending.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<S>cachedListprotected booleanemptyprotected RandomworkingRandom
-
Constructor Summary
Constructors Constructor Description CachedListRandomIterator(List<S> cachedList, Random workingRandom)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Snext()-
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()
-
-