Interface TrapezoidHeight

All Superinterfaces:
HeightProvider, Wrapper

@NullMarked @AsOf("3.0.0") public interface TrapezoidHeight extends HeightProvider
A height provider which samples an isosceles trapezoidal distribution between HeightProvider.minInclusive() and HeightProvider.maxInclusive() with a flat plateau().
Since:
3.0.0
See Also:
  • 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 TrapezoidHeight.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 TrapezoidHeight of(VerticalAnchor minInclusive, VerticalAnchor maxInclusive, int plateau)
      Creates a new trapezoid height provider.
      Parameters:
      minInclusive - the vertical anchor to use as the minimum height
      maxInclusive - the vertical anchor to use as the maximum height
      plateau - the length of the range in the middle that has a uniform distribution
      Returns:
      the trapezoid height provider
      Since:
      3.0.0
    • builder

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