Interface WeightedListInt

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

@NullMarked @AsOf("3.0.0") public interface WeightedListInt extends IntProvider
A two-stage provider: an entry is picked from the distribution() proportionally to its weight, then that entry's provider is sampled. The reported bounds aggregate the min/max across every entry.
Since:
3.0.0
See Also:
  • Method Details

    • distribution

      @AsOf("3.0.0") WeightedList<IntProvider> distribution()
      The weighted pool of providers to sample from.
      Returns:
      the weighted distribution
      Since:
      3.0.0
    • toBuilder

      @AsOf("3.3.0") default WeightedListInt.Builder toBuilder()
      Creates a new builder with the same weighted distribution as this provider.
      Returns:
      a new builder with the same values
      Since:
      3.3.0
    • minInclusive

      @AsOf("3.0.0") default int minInclusive()
      Description copied from interface: IntProvider
      The smallest value this provider can yield.
      Specified by:
      minInclusive in interface IntProvider
      Returns:
      the smallest value this provider can yield.
    • maxInclusive

      @AsOf("3.0.0") default int maxInclusive()
      Description copied from interface: IntProvider
      The largest value this provider can yield.
      Specified by:
      maxInclusive in interface IntProvider
      Returns:
      the largest value this provider can yield.
    • of

      @AsOf("3.0.0") static WeightedListInt of(WeightedList<IntProvider> distribution)
      Creates a new weighted list int provider.
      Parameters:
      distribution - the weighted pool of providers, which must not be empty
      Returns:
      the weighted list int provider
      Since:
      3.0.0
    • builder

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