|
OptaPlanner core 6.2.0.Beta2 | |||||||||
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<Integer>
org.optaplanner.core.impl.domain.valuerange.buildin.primint.IntValueRange
public class IntValueRange
Constructor Summary | |
---|---|
IntValueRange(int from,
int to)
|
|
IntValueRange(int from,
int to,
int incrementUnit)
|
Method Summary | |
---|---|
boolean |
contains(Integer value)
|
Iterator<Integer> |
createOriginalIterator()
Select the elements in original (natural) order. |
Iterator<Integer> |
createRandomIterator(Random workingRandom)
Select in random order, without shuffling the elements. |
Integer |
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 IntValueRange(int from, int to)
from
- inclusive minimumto
- exclusive maximum, >= from
public IntValueRange(int from, int to, int incrementUnit)
from
- inclusive minimumto
- exclusive maximum, >= from
incrementUnit
- > 0Method Detail |
---|
public long getSize()
CountableValueRange
CountableValueRange
, always >= 0public boolean contains(Integer value)
value
- sometimes null
public Integer get(long index)
CountableValueRange
index
- always < CountableValueRange.getSize()
PlanningVariable.nullable()
is true)public Iterator<Integer> createOriginalIterator()
CountableValueRange
public Iterator<Integer> 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.Beta2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |