Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.1.0.CR1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.optaplanner.core.api.domain.valuerange
Interface ValueRange<T>

All Known Subinterfaces:
  CountableValueRange<T>

All Known Implementing Classes:
  AbstractCountableValueRange, AbstractUncountableValueRange, BigDecimalValueRange, CompositeCountableValueRange, DoubleValueRange, EmptyValueRange, IntValueRange, ListValueRange, NullableCountableValueRange

    public interface ValueRange<T>

A ValueRange is a set of a values for a `PlanningVariable`. These values might be stored in memory as a `Collection` (usually a `List` or `Set`), but if the values are numbers, they can also be stored in memory by their bounds to use less memory and provide more opportunities.

Prefer using `CountableValueRange` (which extends this interface) whenever possible.

A ValueRange is stateful (unlike a `ValueSelector` which is stateless

Implementations must be immutable..

An implementation must extend `AbstractCountableValueRange` or `AbstractUncountableValueRange` to ensure backwards compatibility in future versions.

See Also:
  `ValueRangeFactory`, `CountableValueRange`, `AbstractCountableValueRange`, `AbstractUncountableValueRange`

Method Summary
`boolean` | `contains(T value)`
`Iterator<T>` | `createRandomIterator(Random workingRandom)` Select in random order, without shuffling the elements.

Method Detail

### contains

    boolean contains(T value)

  Parameters:
    `value` - sometimes null
  Returns:
    true if the ValueRange contains that value

### createRandomIterator

    Iterator<T> createRandomIterator(Random workingRandom)

  Select in random order, without shuffling the elements. Each element might be selected multiple times. Scales well because it does not require caching.

  Parameters:
    `workingRandom` - never null, the `Random` to use when any random number is needed, so `EnvironmentMode.REPRODUCIBLE` works correctly
  Returns:
    never null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.1.0.CR1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.