public class MimicReplayingEntitySelector extends AbstractEntitySelector
Modifier and Type | Field and Description |
---|---|
protected boolean |
hasRecording |
protected boolean |
hasRecordingCreated |
protected Object |
recording |
protected boolean |
recordingAlreadyReturned |
protected boolean |
recordingCreated |
protected MimicRecordingEntitySelector |
recordingEntitySelector |
logger, solverPhaseLifecycleSupport, workingRandom
Constructor and Description |
---|
MimicReplayingEntitySelector(MimicRecordingEntitySelector recordingEntitySelector) |
Modifier and Type | Method and Description |
---|---|
Iterator<Object> |
endingIterator()
If
Selector.isNeverEnding() is true, then Iterable.iterator() will never end. |
PlanningEntityDescriptor |
getEntityDescriptor() |
long |
getSize()
A random JIT
Selector with Selector.isNeverEnding() true should return a size
as if it would be able to return each distinct element only once,
because the size can be used in SelectionProbabilityWeightFactory . |
boolean |
isContinuous()
If true, then
Selector.isNeverEnding() is also true. |
boolean |
isNeverEnding()
Is true if
Selector.isContinuous() is true
or if this selector is in random order (for most cases). |
Iterator<Object> |
iterator() |
ListIterator<Object> |
listIterator()
|
ListIterator<Object> |
listIterator(int index)
|
void |
phaseEnded(AbstractSolverPhaseScope phaseScope) |
void |
phaseStarted(AbstractSolverPhaseScope phaseScope) |
void |
recordedHasNext(boolean hasNext) |
void |
recordedNext(Object next) |
String |
toString() |
getCacheType, solvingEnded, solvingStarted, stepEnded, stepStarted
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCacheType
stepEnded, stepStarted
solvingEnded, solvingStarted
protected final MimicRecordingEntitySelector recordingEntitySelector
protected boolean hasRecordingCreated
protected boolean hasRecording
protected boolean recordingCreated
protected Object recording
protected boolean recordingAlreadyReturned
public MimicReplayingEntitySelector(MimicRecordingEntitySelector recordingEntitySelector)
public void phaseStarted(AbstractSolverPhaseScope phaseScope)
phaseStarted
in interface SolverPhaseLifecycleListener
phaseStarted
in class AbstractSelector
public void phaseEnded(AbstractSolverPhaseScope phaseScope)
phaseEnded
in interface SolverPhaseLifecycleListener
phaseEnded
in class AbstractSelector
public PlanningEntityDescriptor getEntityDescriptor()
public boolean isContinuous()
Selector
Selector.isNeverEnding()
is also true.public boolean isNeverEnding()
Selector
Selector.isContinuous()
is true
or if this selector is in random order (for most cases).
Is never true when this selector is in shuffled order (which is less scalable but more exact).Iterator.hasNext()
of the Iterator
created by Iterable.iterator()
never returns false.public long getSize()
IterableSelector
Selector
with Selector.isNeverEnding()
true should return a size
as if it would be able to return each distinct element only once,
because the size can be used in SelectionProbabilityWeightFactory
.Selector
, always >= 0public void recordedHasNext(boolean hasNext)
public void recordedNext(Object next)
public Iterator<Object> endingIterator()
EntitySelector
Selector.isNeverEnding()
is true, then Iterable.iterator()
will never end.
This returns an ending Iterator
, that tries to match Iterable.iterator()
as much as possible,
but might not respect the configuration of this EntitySelector
entirely.Iterable.iterator()
public ListIterator<Object> listIterator()
ListIterable
List.listIterator()
.public ListIterator<Object> listIterator(int index)
ListIterable
index
- lower than the size of this ListIterable
, see List.listIterator(int)
.List.listIterator(int)
.Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.