public class CachingValueSelector extends AbstractCachingValueSelector implements EntityIndependentValueSelector
ValueSelector that caches the result of its child ValueSelector.
Keep this code in sync with CachingEntitySelector and CachingMoveSelector.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
randomSelection |
cachedValueList, cacheType, childValueSelectorlogger, phaseLifecycleSupport, workingRandom| Constructor and Description |
|---|
CachingValueSelector(EntityIndependentValueSelector childValueSelector,
SelectionCacheType cacheType,
boolean randomSelection) |
| Modifier and Type | Method and Description |
|---|---|
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() |
constructCache, disposeCache, endingIterator, endingIterator, getCacheType, getChildValueSelector, getSize, getSize, getVariableDescriptor, isCountablephaseEnded, phaseStarted, solvingEnded, solvingStarted, stepEnded, stepStartedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitendingIterator, getSize, getVariableDescriptorgetSizegetCacheType, isCountablephaseEnded, phaseStarted, stepEnded, stepStartedsolvingEnded, solvingStartedforEach, spliteratorpublic CachingValueSelector(EntityIndependentValueSelector childValueSelector, SelectionCacheType cacheType, boolean randomSelection)
public boolean isNeverEnding()
SelectorSelector.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 SelectorIterator.hasNext() of the Iterator created by Iterable.iterator()
never returns false (except when it's empty).public Iterator<Object> iterator(Object entity)
ValueSelectorIterable.iterator(), but requires an entity.iterator in interface ValueSelectorentity - never nullCopyright © 2006–2021 JBoss by Red Hat. All rights reserved.