Interface CountableValueRange<T>
- All Superinterfaces:
ValueRange<T>
- All Known Implementing Classes:
AbstractCountableValueRange,BigDecimalValueRange,BigIntegerValueRange,BooleanValueRange,CompositeCountableValueRange,EmptyValueRange,IntValueRange,ListValueRange,LongValueRange,NullAllowingCountableValueRange,TemporalValueRange
A
ValueRange that is ending. Therefore, it has a discrete (as in non-continuous) range.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionSelect the elements in original (natural) order.@Nullable Tget(long index) Used by uniform random selection in a composite CountableValueRange, or one which includes nulls.longgetSize()Used by uniform random selection in a composite CountableValueRange, or one which includes nulls.Methods inherited from interface ai.timefold.solver.core.api.domain.valuerange.ValueRange
contains, createRandomIterator, isEmpty
-
Method Details
-
getSize
long getSize()Used by uniform random selection in a composite CountableValueRange, or one which includes nulls.- Returns:
- the exact number of elements generated by this
CountableValueRange, always>= 0
-
get
Used by uniform random selection in a composite CountableValueRange, or one which includes nulls.- Parameters:
index- always<getSize()- Returns:
- sometimes null (if
PlanningVariable.allowsUnassigned()is true)
-
createOriginalIterator
Select the elements in original (natural) order.
-