Class FilteringMoveSelector
- java.lang.Object
- 
- org.optaplanner.core.impl.heuristic.selector.AbstractSelector
- 
- org.optaplanner.core.impl.heuristic.selector.move.AbstractMoveSelector
- 
- org.optaplanner.core.impl.heuristic.selector.move.decorator.FilteringMoveSelector
 
 
 
- 
- All Implemented Interfaces:
- Iterable<Move>,- EventListener,- IterableSelector<Move>,- MoveSelector,- Selector,- PhaseLifecycleListener,- SolverLifecycleListener
 
 public class FilteringMoveSelector extends AbstractMoveSelector 
- 
- 
Field SummaryFields Modifier and Type Field Description protected booleanbailOutEnabledprotected MoveSelectorchildMoveSelectorprotected List<SelectionFilter>filterListprotected ScoreDirectorscoreDirector- 
Fields inherited from class org.optaplanner.core.impl.heuristic.selector.AbstractSelectorlogger, phaseLifecycleSupport, workingRandom
 
- 
 - 
Constructor SummaryConstructors Constructor Description FilteringMoveSelector(MoveSelector childMoveSelector, List<SelectionFilter> filterList)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanaccept(ScoreDirector scoreDirector, Move move)protected longdetermineBailOutSize()longgetSize()A random JITSelectorwithSelector.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 inSelectionProbabilityWeightFactory.booleanisCountable()If false, thenSelector.isNeverEnding()is true.booleanisNeverEnding()Is true ifSelector.isCountable()is false or if this selector is in random order (for most cases).Iterator<Move>iterator()voidphaseEnded(AbstractPhaseScope phaseScope)voidphaseStarted(AbstractPhaseScope phaseScope)StringtoString()- 
Methods inherited from class org.optaplanner.core.impl.heuristic.selector.AbstractSelectorgetCacheType, solvingEnded, solvingStarted, stepEnded, stepStarted
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface java.lang.IterableforEach, spliterator
 - 
Methods inherited from interface org.optaplanner.core.impl.heuristic.selector.move.MoveSelectorsupportsPhaseAndSolverCaching
 - 
Methods inherited from interface org.optaplanner.core.impl.phase.event.PhaseLifecycleListenerstepEnded, stepStarted
 - 
Methods inherited from interface org.optaplanner.core.impl.heuristic.selector.SelectorgetCacheType
 - 
Methods inherited from interface org.optaplanner.core.impl.solver.event.SolverLifecycleListenersolvingEnded, solvingStarted
 
- 
 
- 
- 
- 
Field Detail- 
childMoveSelectorprotected final MoveSelector childMoveSelector 
 - 
filterListprotected final List<SelectionFilter> filterList 
 - 
bailOutEnabledprotected final boolean bailOutEnabled 
 - 
scoreDirectorprotected ScoreDirector scoreDirector 
 
- 
 - 
Constructor Detail- 
FilteringMoveSelectorpublic FilteringMoveSelector(MoveSelector childMoveSelector, List<SelectionFilter> filterList) 
 
- 
 - 
Method Detail- 
phaseStartedpublic void phaseStarted(AbstractPhaseScope phaseScope) - Specified by:
- phaseStartedin interface- PhaseLifecycleListener
- Overrides:
- phaseStartedin class- AbstractSelector
 
 - 
phaseEndedpublic void phaseEnded(AbstractPhaseScope phaseScope) - Specified by:
- phaseEndedin interface- PhaseLifecycleListener
- Overrides:
- phaseEndedin class- AbstractSelector
 
 - 
isCountablepublic boolean isCountable() Description copied from interface:SelectorIf false, thenSelector.isNeverEnding()is true.- Returns:
- true if all the ValueRanges are countable (for example a double value range between 1.2 and 1.4 is not countable)
 
 - 
isNeverEndingpublic boolean isNeverEnding() Description copied from interface:SelectorIs true ifSelector.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).- Returns:
- true if the Iterator.hasNext()of theIteratorcreated byIterable.iterator()never returns false (except when it's empty).
 
 - 
getSizepublic long getSize() Description copied from interface:IterableSelectorA random JITSelectorwithSelector.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 inSelectionProbabilityWeightFactory.- Returns:
- the approximate number of elements generated by this Selector, always>= 0
 
 - 
determineBailOutSizeprotected long determineBailOutSize() 
 - 
acceptprotected boolean accept(ScoreDirector scoreDirector, Move move) 
 
- 
 
-