public class SortingValueSelector extends AbstractCachingValueSelector implements EntityIndependentValueSelector
Modifier and Type | Field and Description |
---|---|
protected SelectionSorter |
sorter |
cachedValueList, cacheType, childValueSelector
logger, phaseLifecycleSupport, workingRandom
Constructor and Description |
---|
SortingValueSelector(EntityIndependentValueSelector childValueSelector,
SelectionCacheType cacheType,
SelectionSorter sorter) |
Modifier and Type | Method and Description |
---|---|
void |
constructCache(DefaultSolverScope solverScope) |
boolean |
isNeverEnding()
Is true if
Selector.isCountable() is false
or if this selector is in random order (for most cases). |
Iterator<Object> |
iterator() |
Iterator<Object> |
iterator(Object entity)
Similar to
Iterable.iterator() , but requires an entity. |
String |
toString() |
disposeCache, endingIterator, endingIterator, getCacheType, getChildValueSelector, getSize, getSize, getVariableDescriptor, isCountable
phaseEnded, phaseStarted, solvingEnded, solvingStarted, stepEnded, stepStarted
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
endingIterator, getSize, getVariableDescriptor
getSize
getCacheType, isCountable
phaseEnded, phaseStarted, stepEnded, stepStarted
solvingEnded, solvingStarted
forEach, spliterator
protected final SelectionSorter sorter
public SortingValueSelector(EntityIndependentValueSelector childValueSelector, SelectionCacheType cacheType, SelectionSorter sorter)
public void constructCache(DefaultSolverScope solverScope)
constructCache
in interface SelectionCacheLifecycleListener
constructCache
in class AbstractCachingValueSelector
public boolean isNeverEnding()
Selector
Selector.isCountable()
is false
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).isNeverEnding
in interface Selector
Iterator.hasNext()
of the Iterator
created by Iterable.iterator()
never returns false (except when it's empty).public Iterator<Object> iterator(Object entity)
ValueSelector
Iterable.iterator()
, but requires an entity.iterator
in interface ValueSelector
entity
- never nullCopyright © 2006–2020 JBoss by Red Hat. All rights reserved.