org.drools.planner.core.heuristic.selector.common.iterator
Class CachedListRandomIterator<S>
java.lang.Object
org.drools.planner.core.heuristic.selector.common.iterator.CachedListRandomIterator<S>
- Type Parameters:
S
-
- All Implemented Interfaces:
- Iterator<S>
public class CachedListRandomIterator<S>
- extends Object
- implements Iterator<S>
This Iterator
does not shuffle and is never ending.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cachedList
protected final List<S> cachedList
workingRandom
protected final Random workingRandom
notEmpty
protected final boolean notEmpty
CachedListRandomIterator
public CachedListRandomIterator(List<S> cachedList,
Random workingRandom)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<S>
next
public S next()
- Specified by:
next
in interface Iterator<S>
remove
public void remove()
- Specified by:
remove
in interface Iterator<S>
Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.