Record Class IntProvider.WeightedList
java.lang.Object
java.lang.Record
fr.fidorial.world.dimension.IntProvider.WeightedList
- Record Components:
distribution- the pool of weighted entries to pick from, never empty
- All Implemented Interfaces:
IntProvider
- Enclosing interface:
IntProvider
public static record IntProvider.WeightedList(List<IntProvider.WeightedList.Entry> distribution)
extends Record
implements IntProvider
- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface IntProvider
IntProvider.BiasedToBottom, IntProvider.Clamped, IntProvider.ClampedNormal, IntProvider.Constant, IntProvider.Uniform, IntProvider.WeightedList -
Constructor Summary
ConstructorsConstructorDescriptionWeightedList(List<IntProvider.WeightedList.Entry> distribution) Creates an instance of aWeightedListrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedistributionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WeightedList
Creates an instance of aWeightedListrecord class.- Parameters:
distribution- the value for thedistributionrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
distribution
Returns the value of thedistributionrecord component.- Returns:
- the value of the
distributionrecord component
-