Class RangeChoice.Builder

java.lang.Object
dev.wyck.worldgen.function.misc.RangeChoice.Builder
Enclosing interface:
RangeChoice

@AsOf("3.0.0") public static final class RangeChoice.Builder extends Object
Builder for RangeChoice.
Since:
3.0.0
  • Method Details

    • resourceKey

      @AsOf("3.0.0") public RangeChoice.Builder resourceKey(ResourceKey resourceKey)
      Sets the resource key.
      Parameters:
      resourceKey - the resource key
      Returns:
      this builder
      Since:
      3.0.0
    • input

      @AsOf("3.0.0") public RangeChoice.Builder input(DensityFunction input)
      Sets the value to compare against the range.
      Parameters:
      input - the input density function
      Returns:
      this builder
      Since:
      3.0.0
    • minInclusive

      @AsOf("3.0.0") public RangeChoice.Builder minInclusive(double minInclusive)
      Sets the lower bound of the range, inclusive.
      Parameters:
      minInclusive - the minimum inclusive value
      Returns:
      this builder
      Since:
      3.0.0
    • maxExclusive

      @AsOf("3.0.0") public RangeChoice.Builder maxExclusive(double maxExclusive)
      Sets the upper bound of the range, exclusive.
      Parameters:
      maxExclusive - the maximum exclusive value
      Returns:
      this builder
      Since:
      3.0.0
    • whenInRange

      @AsOf("3.0.0") public RangeChoice.Builder whenInRange(DensityFunction whenInRange)
      Sets the density function used when the input is inside the range.
      Parameters:
      whenInRange - the in-range density function
      Returns:
      this builder
      Since:
      3.0.0
    • whenOutOfRange

      @AsOf("3.0.0") public RangeChoice.Builder whenOutOfRange(DensityFunction whenOutOfRange)
      Sets the density function used when the input is outside the range.
      Parameters:
      whenOutOfRange - the out-of-range density function
      Returns:
      this builder
      Since:
      3.0.0
    • build

      @AsOf("3.0.0") public RangeChoice build()
      Builds the range choice density function.
      Returns:
      the range choice density function
      Since:
      3.0.0