Interface TrapezoidInt

All Superinterfaces:
Comparable<ValueProvider>, IntProvider, ValueProvider, Wrapper

@NullMarked @AsOf("3.0.0") public interface TrapezoidInt extends IntProvider
A trapezoid int provider.
Since:
3.0.0
  • Method Details

    • plateau

      @AsOf("3.0.0") int plateau()
      The length of the range in the middle that has a uniform distribution.
      Returns:
      the plateau
      Since:
      3.0.0
    • toBuilder

      @AsOf("3.0.0") default TrapezoidInt.Builder toBuilder()
      Converts this object back to a builder.
      Returns:
      a builder with the same values as this object
      Since:
      3.0.0
    • of

      @AsOf("3.0.0") static TrapezoidInt of(int min, int max, int plateau)
      Creates a new trapezoid int provider.
      Parameters:
      min - min inclusive
      max - max inclusive
      plateau - the length of the range in the middle that has a uniform distribution
      Returns:
      the trapezoid int provider
      Since:
      3.0.0
    • triangle

      @AsOf("3.0.0") static TrapezoidInt triangle(int range)
      A symmetric triangular distribution over [-IntProvider.minInclusive(), IntProvider.maxInclusive()].
      Parameters:
      range - the range of the triangular distribution
      Returns:
      the trapezoid int provider
      Since:
      3.0.0
    • builder

      @AsOf("3.0.0") static TrapezoidInt.Builder builder()
      Creates a new builder.
      Returns:
      a new builder
      Since:
      3.0.0