Class DoubleValueRange
- java.lang.Object
-
- org.optaplanner.core.impl.domain.valuerange.AbstractUncountableValueRange<Double>
-
- org.optaplanner.core.impl.domain.valuerange.buildin.primdouble.DoubleValueRange
-
- All Implemented Interfaces:
ValueRange<Double>
public class DoubleValueRange extends AbstractUncountableValueRange<Double>
-
-
Constructor Summary
Constructors Constructor Description DoubleValueRange(double from, double to)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(Double value)Iterator<Double>createRandomIterator(Random workingRandom)Select in random order, but without shuffling the elements.booleanisEmpty()In aCountableValueRange, this must be consistent withCountableValueRange.getSize().StringtoString()
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Description copied from interface:ValueRangeIn aCountableValueRange, this must be consistent withCountableValueRange.getSize().- Returns:
- true if the range is empty
-
contains
public boolean contains(Double value)
- Parameters:
value- sometimes null- Returns:
- true if the ValueRange contains that value
-
createRandomIterator
public Iterator<Double> createRandomIterator(Random workingRandom)
Description copied from interface:ValueRangeSelect in random order, but without shuffling the elements. Each element might be selected multiple times. Scales well because it does not require caching.- Parameters:
workingRandom- never null, theRandomto use when any random number is needed, soEnvironmentMode.REPRODUCIBLEworks correctly.RandomUtilscan be useful too.- Returns:
- never null
-
-