Class ValueRangeFactory
- java.lang.Object
- 
- org.optaplanner.core.api.domain.valuerange.ValueRangeFactory
 
- 
 public final class ValueRangeFactory extends Object Factory forValueRange.
- 
- 
Constructor SummaryConstructors Constructor Description ValueRangeFactory()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static CountableValueRange<BigDecimal>createBigDecimalValueRange(BigDecimal from, BigDecimal to)Build aCountableValueRangeof allBigDecimalvalues (of a specific scale) between 2 bounds.static CountableValueRange<BigDecimal>createBigDecimalValueRange(BigDecimal from, BigDecimal to, BigDecimal incrementUnit)Build aCountableValueRangeof a subset ofBigDecimalvalues (of a specific scale) between 2 bounds.static CountableValueRange<BigInteger>createBigIntegerValueRange(BigInteger from, BigInteger to)Build aCountableValueRangeof allBigIntegervalues between 2 bounds.static CountableValueRange<BigInteger>createBigIntegerValueRange(BigInteger from, BigInteger to, BigInteger incrementUnit)Build aCountableValueRangeof a subset ofBigIntegervalues between 2 bounds.static CountableValueRange<Boolean>createBooleanValueRange()Build aCountableValueRangeof bothbooleanvalues.static ValueRange<Double>createDoubleValueRange(double from, double to)Build an uncountableValueRangeof alldoublevalues between 2 bounds.static CountableValueRange<Integer>createIntValueRange(int from, int to)Build aCountableValueRangeof allintvalues between 2 bounds.static CountableValueRange<Integer>createIntValueRange(int from, int to, int incrementUnit)Build aCountableValueRangeof a subset ofintvalues between 2 bounds.static CountableValueRange<LocalDateTime>createLocalDateTimeValueRange(LocalDateTime from, LocalDateTime to, long incrementUnitAmount, TemporalUnit incrementUnitType)Build aCountableValueRangeof a subset ofLocalDateTimevalues between 2 bounds.static CountableValueRange<LocalDate>createLocalDateValueRange(LocalDate from, LocalDate to, long incrementUnitAmount, TemporalUnit incrementUnitType)Build aCountableValueRangeof a subset ofLocalDatevalues between 2 bounds.static CountableValueRange<LocalTime>createLocalTimeValueRange(LocalTime from, LocalTime to, long incrementUnitAmount, TemporalUnit incrementUnitType)Build aCountableValueRangeof a subset ofLocalTimevalues between 2 bounds.static CountableValueRange<Long>createLongValueRange(long from, long to)Build aCountableValueRangeof alllongvalues between 2 bounds.static CountableValueRange<Long>createLongValueRange(long from, long to, long incrementUnit)Build aCountableValueRangeof a subset oflongvalues between 2 bounds.static <Temporal_ extends Temporal & Comparable<? super Temporal_>>
 CountableValueRange<Temporal_>createTemporalValueRange(Temporal_ from, Temporal_ to, long incrementUnitAmount, TemporalUnit incrementUnitType)Build aCountableValueRangeof a subset ofTemporalvalues (such asLocalDateorLocalDateTime) between 2 bounds.
 
- 
- 
- 
Method Detail- 
createBooleanValueRangepublic static CountableValueRange<Boolean> createBooleanValueRange() Build aCountableValueRangeof bothbooleanvalues.- Returns:
- never null
 
 - 
createIntValueRangepublic static CountableValueRange<Integer> createIntValueRange(int from, int to) Build aCountableValueRangeof allintvalues between 2 bounds.- Parameters:
- from- inclusive minimum
- to- exclusive maximum,- >= from
- Returns:
- never null
 
 - 
createIntValueRangepublic static CountableValueRange<Integer> createIntValueRange(int from, int to, int incrementUnit) Build aCountableValueRangeof a subset ofintvalues between 2 bounds.- Parameters:
- from- inclusive minimum
- to- exclusive maximum,- >= from
- incrementUnit-- > 0
- Returns:
- never null
 
 - 
createLongValueRangepublic static CountableValueRange<Long> createLongValueRange(long from, long to) Build aCountableValueRangeof alllongvalues between 2 bounds.- Parameters:
- from- inclusive minimum
- to- exclusive maximum,- >= from
- Returns:
- never null
 
 - 
createLongValueRangepublic static CountableValueRange<Long> createLongValueRange(long from, long to, long incrementUnit) Build aCountableValueRangeof a subset oflongvalues between 2 bounds.- Parameters:
- from- inclusive minimum
- to- exclusive maximum,- >= from
- incrementUnit-- > 0
- Returns:
- never null
 
 - 
createDoubleValueRangepublic static ValueRange<Double> createDoubleValueRange(double from, double to) Build an uncountableValueRangeof alldoublevalues between 2 bounds.- Parameters:
- from- inclusive minimum
- to- exclusive maximum,- >= from
- Returns:
- never null
 
 - 
createBigIntegerValueRangepublic static CountableValueRange<BigInteger> createBigIntegerValueRange(BigInteger from, BigInteger to) Build aCountableValueRangeof allBigIntegervalues between 2 bounds.- Parameters:
- from- inclusive minimum
- to- exclusive maximum,- >= from
- Returns:
- never null
 
 - 
createBigIntegerValueRangepublic static CountableValueRange<BigInteger> createBigIntegerValueRange(BigInteger from, BigInteger to, BigInteger incrementUnit) Build aCountableValueRangeof a subset ofBigIntegervalues between 2 bounds.- Parameters:
- from- inclusive minimum
- to- exclusive maximum,- >= from
- incrementUnit-- > 0
- Returns:
- never null
 
 - 
createBigDecimalValueRangepublic static CountableValueRange<BigDecimal> createBigDecimalValueRange(BigDecimal from, BigDecimal to) Build aCountableValueRangeof allBigDecimalvalues (of a specific scale) between 2 bounds. All parameters must have the sameBigDecimal.scale().- Parameters:
- from- inclusive minimum
- to- exclusive maximum,- >= from
- Returns:
- never null
 
 - 
createBigDecimalValueRangepublic static CountableValueRange<BigDecimal> createBigDecimalValueRange(BigDecimal from, BigDecimal to, BigDecimal incrementUnit) Build aCountableValueRangeof a subset ofBigDecimalvalues (of a specific scale) between 2 bounds. All parameters must have the sameBigDecimal.scale().- Parameters:
- from- inclusive minimum
- to- exclusive maximum,- >= from
- incrementUnit-- > 0
- Returns:
- never null
 
 - 
createLocalDateValueRangepublic static CountableValueRange<LocalDate> createLocalDateValueRange(LocalDate from, LocalDate to, long incrementUnitAmount, TemporalUnit incrementUnitType) Build aCountableValueRangeof a subset ofLocalDatevalues between 2 bounds.Facade for createTemporalValueRange(Temporal, Temporal, long, TemporalUnit).- Parameters:
- from- never null, inclusive minimum
- to- never null, exclusive maximum,- >= from
- incrementUnitAmount-- > 0
- incrementUnitType- never null, must be- supported
 
 - 
createLocalTimeValueRangepublic static CountableValueRange<LocalTime> createLocalTimeValueRange(LocalTime from, LocalTime to, long incrementUnitAmount, TemporalUnit incrementUnitType) Build aCountableValueRangeof a subset ofLocalTimevalues between 2 bounds.Facade for createTemporalValueRange(Temporal, Temporal, long, TemporalUnit).- Parameters:
- from- never null, inclusive minimum
- to- never null, exclusive maximum,- >= from
- incrementUnitAmount-- > 0
- incrementUnitType- never null, must be- supported
 
 - 
createLocalDateTimeValueRangepublic static CountableValueRange<LocalDateTime> createLocalDateTimeValueRange(LocalDateTime from, LocalDateTime to, long incrementUnitAmount, TemporalUnit incrementUnitType) Build aCountableValueRangeof a subset ofLocalDateTimevalues between 2 bounds.Facade for createTemporalValueRange(Temporal, Temporal, long, TemporalUnit).- Parameters:
- from- never null, inclusive minimum
- to- never null, exclusive maximum,- >= from
- incrementUnitAmount-- > 0
- incrementUnitType- never null, must be- supported
 
 - 
createTemporalValueRangepublic static <Temporal_ extends Temporal & Comparable<? super Temporal_>> CountableValueRange<Temporal_> createTemporalValueRange(Temporal_ from, Temporal_ to, long incrementUnitAmount, TemporalUnit incrementUnitType) Build aCountableValueRangeof a subset ofTemporalvalues (such asLocalDateorLocalDateTime) between 2 bounds. All parameters must have the sameTemporalUnit.- Parameters:
- from- never null, inclusive minimum
- to- never null, exclusive maximum,- >= from
- incrementUnitAmount-- > 0
- incrementUnitType- never null, must be- supportedby- fromand- to
 
 
- 
 
-