|
OptaPlanner core 6.2.0.CR2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.optaplanner.core.impl.domain.valuerange.AbstractCountableValueRange<BigDecimal>
org.optaplanner.core.impl.domain.valuerange.buildin.bigdecimal.BigDecimalValueRange
public class BigDecimalValueRange
Constructor Summary | |
---|---|
BigDecimalValueRange(BigDecimal from,
BigDecimal to)
All parameters must have the same BigDecimal.scale() . |
|
BigDecimalValueRange(BigDecimal from,
BigDecimal to,
BigDecimal incrementUnit)
All parameters must have the same BigDecimal.scale() . |
Method Summary | |
---|---|
boolean |
contains(BigDecimal value)
|
Iterator<BigDecimal> |
createOriginalIterator()
Select the elements in original (natural) order. |
Iterator<BigDecimal> |
createRandomIterator(Random workingRandom)
Select in random order, without shuffling the elements. |
BigDecimal |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BigDecimalValueRange(BigDecimal from, BigDecimal to)
BigDecimal.scale()
.
from
- inclusive minimumto
- exclusive maximum, >= from
public BigDecimalValueRange(BigDecimal from, BigDecimal to, BigDecimal incrementUnit)
BigDecimal.scale()
.
from
- inclusive minimumto
- exclusive maximum, >= from
incrementUnit
- > 0Method Detail |
---|
public long getSize()
CountableValueRange
CountableValueRange
, always >= 0public BigDecimal get(long index)
CountableValueRange
index
- always < CountableValueRange.getSize()
PlanningVariable.nullable()
is true)public boolean contains(BigDecimal value)
value
- sometimes null
public Iterator<BigDecimal> createOriginalIterator()
CountableValueRange
public Iterator<BigDecimal> createRandomIterator(Random workingRandom)
ValueRange
workingRandom
- never null, the Random
to use when any random number is needed,
so EnvironmentMode.REPRODUCIBLE
works correctly
|
OptaPlanner core 6.2.0.CR2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |