Interface ValueSelector<Solution_>
- All Superinterfaces:
EventListener,PhaseLifecycleListener<Solution_>,Selector<Solution_>,SolverLifecycleListener<Solution_>
- All Known Subinterfaces:
EntityIndependentValueSelector<Solution_>
- All Known Implementing Classes:
AbstractCachingValueSelector,AssignedListValueSelector,CachingValueSelector,DowncastingValueSelector,EntityDependentSortingValueSelector,EntityIndependentFilteringValueSelector,EntityIndependentInitializedValueSelector,FilteringValueSelector,FromEntityPropertyValueSelector,FromSolutionPropertyValueSelector,InitializedValueSelector,MimicRecordingValueSelector,MimicReplayingValueSelector,ProbabilityValueSelector,ReinitializeVariableValueSelector,SelectedCountLimitValueSelector,ShufflingValueSelector,SortingValueSelector,UnassignedListValueSelector
Selects values from the
ValueRangeProvider for a PlanningVariable annotated property.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionendingIterator(Object entity) IfSelector.isNeverEnding()is true, theniterator(Object)will never end.longSimilar toIterableSelector.getSize(), but requires an entity.Similar toIterable.iterator(), but requires an entity.Methods inherited from interface ai.timefold.solver.core.impl.phase.event.PhaseLifecycleListener
phaseEnded, phaseStarted, stepEnded, stepStartedMethods inherited from interface ai.timefold.solver.core.impl.heuristic.selector.Selector
getCacheType, isCountable, isNeverEndingMethods inherited from interface ai.timefold.solver.core.impl.solver.event.SolverLifecycleListener
solvingEnded, solvingError, solvingStarted
-
Method Details
-
getVariableDescriptor
GenuineVariableDescriptor<Solution_> getVariableDescriptor()- Returns:
- never null
-
getSize
Similar toIterableSelector.getSize(), but requires an entity.- Parameters:
entity- never null- Returns:
- the approximate number of elements generated by this
Selector, always>= 0 - Throws:
IllegalStateException- ifSelector.isCountable()returns false, but not if onlySelector.isNeverEnding()returns true
-
iterator
Similar toIterable.iterator(), but requires an entity.- Parameters:
entity- never null- Returns:
- never null
-
endingIterator
IfSelector.isNeverEnding()is true, theniterator(Object)will never end. This returns an endingIterator, that tries to matchiterator(Object)as much as possible, but return each distinct element only once and therefore it might not respect the configuration of thisValueSelectorentirely.- Parameters:
entity- never null- Returns:
- never null
- See Also:
-