org.optaplanner.core.api.domain.valuerange

## Class ValueRangeFactory

- java.lang.Object
- - org.optaplanner.core.api.domain.valuerange.ValueRangeFactory

-     public class ValueRangeFactory
      extends Object

  Factory for `ValueRange`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValueRangeFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CountableValueRange<BigDecimal>` | `createBigDecimalValueRange(BigDecimal from, BigDecimal to)` Build a `CountableValueRange` of all `BigDecimal` values (of a specific scale) between 2 bounds.
    `static CountableValueRange<BigDecimal>` | `createBigDecimalValueRange(BigDecimal from, BigDecimal to, BigDecimal incrementUnit)` Build a `CountableValueRange` of a subset of `BigDecimal` values (of a specific scale) between 2 bounds.
    `static CountableValueRange<BigInteger>` | `createBigIntegerValueRange(BigInteger from, BigInteger to)` Build a `CountableValueRange` of all `BigInteger` values between 2 bounds.
    `static CountableValueRange<BigInteger>` | `createBigIntegerValueRange(BigInteger from, BigInteger to, BigInteger incrementUnit)` Build a `CountableValueRange` of a subset of `BigInteger` values between 2 bounds.
    `static CountableValueRange<Boolean>` | `createBooleanValueRange()` Build a `CountableValueRange` of both `boolean` values.
    `static ValueRange<Double>` | `createDoubleValueRange(double from, double to)` Build an uncountable `ValueRange` of all `double` values between 2 bounds.
    `static CountableValueRange<Integer>` | `createIntValueRange(int from, int to)` Build a `CountableValueRange` of all `int` values between 2 bounds.
    `static CountableValueRange<Integer>` | `createIntValueRange(int from, int to, int incrementUnit)` Build a `CountableValueRange` of a subset of `int` values between 2 bounds.
    `static CountableValueRange<LocalDateTime>` | `createLocalDateTimeValueRange(LocalDateTime from, LocalDateTime to, long incrementUnitAmount, TemporalUnit incrementUnitType)` Build a `CountableValueRange` of a subset of `LocalDateTime` values between 2 bounds.
    `static CountableValueRange<LocalDate>` | `createLocalDateValueRange(LocalDate from, LocalDate to, long incrementUnitAmount, TemporalUnit incrementUnitType)` Build a `CountableValueRange` of a subset of `LocalDate` values between 2 bounds.
    `static CountableValueRange<LocalTime>` | `createLocalTimeValueRange(LocalTime from, LocalTime to, long incrementUnitAmount, TemporalUnit incrementUnitType)` Build a `CountableValueRange` of a subset of `LocalTime` values between 2 bounds.
    `static CountableValueRange<Long>` | `createLongValueRange(long from, long to)` Build a `CountableValueRange` of all `long` values between 2 bounds.
    `static CountableValueRange<Long>` | `createLongValueRange(long from, long to, long incrementUnit)` Build a `CountableValueRange` of a subset of `long` values between 2 bounds.
    `static <Temporal_ extends Temporal & Comparable<? super Temporal_>> CountableValueRange<Temporal_>` | `createTemporalValueRange(Temporal_ from, Temporal_ to, long incrementUnitAmount, TemporalUnit incrementUnitType)` Build a `CountableValueRange` of a subset of `Temporal` values (such as `LocalDate` or `LocalDateTime`) between 2 bounds.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ValueRangeFactory

          public ValueRangeFactory()

  - ### Method Detail

    - #### createBooleanValueRange

          public static CountableValueRange<Boolean> createBooleanValueRange()

      Build a `CountableValueRange` of both `boolean` values.
      Returns:
        never null

    - #### createIntValueRange

          public static CountableValueRange<Integer> createIntValueRange(int from,
                                                                         int to)

      Build a `CountableValueRange` of all `int` values between 2 bounds.
      Parameters:
        `from` - inclusive minimum
        `to` - exclusive maximum, `>= from`
      Returns:
        never null

    - #### createIntValueRange

          public static CountableValueRange<Integer> createIntValueRange(int from,
                                                                         int to,
                                                                         int incrementUnit)

      Build a `CountableValueRange` of a subset of `int` values between 2 bounds.
      Parameters:
        `from` - inclusive minimum
        `to` - exclusive maximum, `>= from`
        `incrementUnit` - `> 0`
      Returns:
        never null

    - #### createLongValueRange

          public static CountableValueRange<Long> createLongValueRange(long from,
                                                                       long to)

      Build a `CountableValueRange` of all `long` values between 2 bounds.
      Parameters:
        `from` - inclusive minimum
        `to` - exclusive maximum, `>= from`
      Returns:
        never null

    - #### createLongValueRange

          public static CountableValueRange<Long> createLongValueRange(long from,
                                                                       long to,
                                                                       long incrementUnit)

      Build a `CountableValueRange` of a subset of `long` values between 2 bounds.
      Parameters:
        `from` - inclusive minimum
        `to` - exclusive maximum, `>= from`
        `incrementUnit` - `> 0`
      Returns:
        never null

    - #### createDoubleValueRange

          public static ValueRange<Double> createDoubleValueRange(double from,
                                                                  double to)

      Build an uncountable `ValueRange` of all `double` values between 2 bounds.
      Parameters:
        `from` - inclusive minimum
        `to` - exclusive maximum, `>= from`
      Returns:
        never null

    - #### createBigIntegerValueRange

          public static CountableValueRange<BigInteger> createBigIntegerValueRange(BigInteger from,
                                                                                   BigInteger to)

      Build a `CountableValueRange` of all `BigInteger` values between 2 bounds.
      Parameters:
        `from` - inclusive minimum
        `to` - exclusive maximum, `>= from`
      Returns:
        never null

    - #### createBigIntegerValueRange

          public static CountableValueRange<BigInteger> createBigIntegerValueRange(BigInteger from,
                                                                                   BigInteger to,
                                                                                   BigInteger incrementUnit)

      Build a `CountableValueRange` of a subset of `BigInteger` values between 2 bounds.
      Parameters:
        `from` - inclusive minimum
        `to` - exclusive maximum, `>= from`
        `incrementUnit` - `> 0`
      Returns:
        never null

    - #### createBigDecimalValueRange

          public static CountableValueRange<BigDecimal> createBigDecimalValueRange(BigDecimal from,
                                                                                   BigDecimal to)

      Build a `CountableValueRange` of all `BigDecimal` values (of a specific scale) between 2 bounds. All parameters must have the same `BigDecimal.scale()`.
      Parameters:
        `from` - inclusive minimum
        `to` - exclusive maximum, `>= from`
      Returns:
        never null

    - #### createBigDecimalValueRange

          public static CountableValueRange<BigDecimal> createBigDecimalValueRange(BigDecimal from,
                                                                                   BigDecimal to,
                                                                                   BigDecimal incrementUnit)

      Build a `CountableValueRange` of a subset of `BigDecimal` values (of a specific scale) between 2 bounds. All parameters must have the same `BigDecimal.scale()`.
      Parameters:
        `from` - inclusive minimum
        `to` - exclusive maximum, `>= from`
        `incrementUnit` - `> 0`
      Returns:
        never null

    - #### createLocalDateValueRange

          public static CountableValueRange<LocalDate> createLocalDateValueRange(LocalDate from,
                                                                                 LocalDate to,
                                                                                 long incrementUnitAmount,
                                                                                 TemporalUnit incrementUnitType)

      Build a `CountableValueRange` of a subset of `LocalDate` values 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`

    - #### createLocalTimeValueRange

          public static CountableValueRange<LocalTime> createLocalTimeValueRange(LocalTime from,
                                                                                 LocalTime to,
                                                                                 long incrementUnitAmount,
                                                                                 TemporalUnit incrementUnitType)

      Build a `CountableValueRange` of a subset of `LocalTime` values 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`

    - #### createLocalDateTimeValueRange

          public static CountableValueRange<LocalDateTime> createLocalDateTimeValueRange(LocalDateTime from,
                                                                                         LocalDateTime to,
                                                                                         long incrementUnitAmount,
                                                                                         TemporalUnit incrementUnitType)

      Build a `CountableValueRange` of a subset of `LocalDateTime` values 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`

    - #### createTemporalValueRange

          public static <Temporal_ extends Temporal & Comparable<? super Temporal_>> CountableValueRange<Temporal_> createTemporalValueRange(Temporal_ from,
                                                                                                                                             Temporal_ to,
                                                                                                                                             long incrementUnitAmount,
                                                                                                                                             TemporalUnit incrementUnitType)

      Build a `CountableValueRange` of a subset of `Temporal` values (such as `LocalDate` or `LocalDateTime`) between 2 bounds. All parameters must have the same `TemporalUnit`.
      Parameters:
        `from` - never null, inclusive minimum
        `to` - never null, exclusive maximum, `>= from`
        `incrementUnitAmount` - `> 0`
        `incrementUnitType` - never null, must be `supported` by `from` and `to`

Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.