Interface Selector<Solution_>
- All Superinterfaces:
EventListener,PhaseLifecycleListener<Solution_>,SolverLifecycleListener<Solution_>
- All Known Subinterfaces:
DestinationSelector<Solution_>,EntityIndependentValueSelector<Solution_>,EntitySelector<Solution_>,IterableSelector<Solution_,,T> ListIterableSelector<Solution_,,T> MoveSelector<Solution_>,PillarSelector<Solution_>,SubChainSelector<Solution_>,SubListSelector<Solution_>,ValueSelector<Solution_>
- All Known Implementing Classes:
AbstractCachingEntitySelector,AbstractCachingMoveSelector,AbstractCachingValueSelector,AbstractDemandEnabledSelector,AbstractMoveSelector,AbstractNearbySelector,AbstractSelector,AssignedValueSelector,CachingEntitySelector,CachingMoveSelector,CachingValueSelector,CartesianProductMoveSelector,ChangeMoveSelector,CompositeMoveSelector,DefaultPillarSelector,DefaultSubChainSelector,DowncastingValueSelector,ElementDestinationSelector,EntityDependentSortingValueSelector,EntityIndependentFilteringValueSelector,EntityIndependentInitializedValueSelector,FilteringEntitySelector,FilteringMoveSelector,FilteringValueSelector,FromEntityPropertyValueSelector,FromSolutionEntitySelector,FromSolutionPropertyValueSelector,GenericMoveSelector,InitializedValueSelector,KOptMoveSelector,ListChangeMoveSelector,ListSwapMoveSelector,MimicRecordingEntitySelector,MimicRecordingSubListSelector,MimicRecordingValueSelector,MimicReplayingEntitySelector,MimicReplayingSubListSelector,MimicReplayingValueSelector,MoveIteratorFactoryToMoveSelectorBridge,MoveListFactoryToMoveSelectorBridge,NearEntityNearbyEntitySelector,NearEntityNearbyValueSelector,NearSubListNearbyDestinationSelector,NearSubListNearbySubListSelector,NearValueNearbyDestinationSelector,NearValueNearbyValueSelector,PillarChangeMoveSelector,PillarSwapMoveSelector,ProbabilityEntitySelector,ProbabilityMoveSelector,ProbabilityValueSelector,RandomSubListChangeMoveSelector,RandomSubListSelector,RandomSubListSwapMoveSelector,ReinitializeVariableValueSelector,SelectedCountLimitEntitySelector,SelectedCountLimitMoveSelector,SelectedCountLimitValueSelector,ShufflingEntitySelector,ShufflingMoveSelector,ShufflingValueSelector,SortingEntitySelector,SortingMoveSelector,SortingValueSelector,SubChainChangeMoveSelector,SubChainSwapMoveSelector,SwapMoveSelector,TailChainSwapMoveSelector,UnassignedValueSelector,UnionMoveSelector
General interface for
MoveSelector, EntitySelector and ValueSelector
which generates Moves or parts of them.-
Method Summary
Modifier and TypeMethodDescriptionUnless this selector itself caches, this returnsSelectionCacheType.JUST_IN_TIME, even if a selector child caches.booleanIf false, thenisNeverEnding()is true.booleanIs true ifisCountable()is false or if this selector is in random order (for most cases).Methods inherited from interface org.optaplanner.core.impl.phase.event.PhaseLifecycleListener
phaseEnded, phaseStarted, stepEnded, stepStartedMethods inherited from interface org.optaplanner.core.impl.solver.event.SolverLifecycleListener
solvingEnded, solvingError, solvingStarted
-
Method Details
-
isCountable
boolean isCountable()If false, thenisNeverEnding()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)
-
isNeverEnding
boolean isNeverEnding()Is true ifisCountable()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).
-
getCacheType
SelectionCacheType getCacheType()Unless this selector itself caches, this returnsSelectionCacheType.JUST_IN_TIME, even if a selector child caches.- Returns:
- never null
-