OptaPlanner core 6.0.0.CR2

org.optaplanner.core.impl.heuristic.selector.common.iterator
Class CachedListRandomIterator<S>

java.lang.Object
  extended by org.optaplanner.core.impl.heuristic.selector.common.iterator.SelectionIterator<S>
      extended by org.optaplanner.core.impl.heuristic.selector.common.iterator.CachedListRandomIterator<S>
Type Parameters:
S -
All Implemented Interfaces:
Iterator<S>

public class CachedListRandomIterator<S>
extends SelectionIterator<S>

This Iterator does not shuffle and is never ending.


Field Summary
protected  List<S> cachedList
           
protected  boolean notEmpty
           
protected  Random workingRandom
           
 
Constructor Summary
CachedListRandomIterator(List<S> cachedList, Random workingRandom)
           
 
Method Summary
 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
 

Field Detail

cachedList

protected final List<S> cachedList

workingRandom

protected final Random workingRandom

notEmpty

protected final boolean notEmpty
Constructor Detail

CachedListRandomIterator

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

hasNext

public boolean hasNext()

next

public S next()

OptaPlanner core 6.0.0.CR2

Copyright © 2006-2013 JBoss by Red Hat. All Rights Reserved.