public class TemporalValueRange<Temporal_ extends Temporal & Comparable<? super Temporal_>> extends AbstractCountableValueRange<Temporal_>
| Constructor and Description |
|---|
TemporalValueRange(Temporal_ from,
Temporal_ to,
long incrementUnitAmount,
TemporalUnit incrementUnitType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Temporal_ value) |
Iterator<Temporal_> |
createOriginalIterator()
Select the elements in original (natural) order.
|
Iterator<Temporal_> |
createRandomIterator(Random workingRandom)
Select in random order, but without shuffling the elements.
|
Temporal_ |
get(long index)
Used by uniform random selection in a composite or nullable CountableValueRange.
|
long |
getSize()
Used by uniform random selection in a composite or nullable CountableValueRange.
|
String |
toString() |
isEmptypublic TemporalValueRange(Temporal_ from, Temporal_ to, long incrementUnitAmount, TemporalUnit incrementUnitType)
from - never null, inclusive minimumto - never null, exclusive maximum, >= fromincrementUnitAmount - > 0incrementUnitType - never null, must be supported by from
and topublic long getSize()
CountableValueRangeCountableValueRange, always >= 0public Temporal_ get(long index)
CountableValueRangeindex - always < CountableValueRange.getSize()PlanningVariable.nullable() is true)public boolean contains(Temporal_ value)
value - sometimes nullpublic Iterator<Temporal_> createOriginalIterator()
CountableValueRangepublic Iterator<Temporal_> createRandomIterator(Random workingRandom)
ValueRangeworkingRandom - never null, the Random to use when any random number is needed,
so EnvironmentMode.REPRODUCIBLE works correctly. RandomUtils can be useful too.Copyright © 2006–2018 JBoss by Red Hat. All rights reserved.