Record Class IntProvider.ClampedNormal
java.lang.Object
java.lang.Record
fr.fidorial.world.dimension.IntProvider.ClampedNormal
- Record Components:
mean- the mean of the normal distributiondeviation- the deviation of the normal distributionminInclusive- the minimum allowed value that the result will bemaxInclusive- the maximum allowed value that the result will be
- All Implemented Interfaces:
IntProvider
- Enclosing interface:
IntProvider
public static record IntProvider.ClampedNormal(float mean, float deviation, int minInclusive, int maxInclusive)
extends Record
implements IntProvider
- Since:
- 0.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface IntProvider
IntProvider.BiasedToBottom, IntProvider.Clamped, IntProvider.ClampedNormal, IntProvider.Constant, IntProvider.Uniform, IntProvider.WeightedList -
Constructor Summary
ConstructorsConstructorDescriptionClampedNormal(float mean, float deviation, int minInclusive, int maxInclusive) Creates an instance of aClampedNormalrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thedeviationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxInclusiverecord component.floatmean()Returns the value of themeanrecord component.intReturns the value of theminInclusiverecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClampedNormal
public ClampedNormal(float mean, float deviation, int minInclusive, int maxInclusive) Creates an instance of aClampedNormalrecord class.- Parameters:
mean- the value for themeanrecord componentdeviation- the value for thedeviationrecord componentminInclusive- the value for theminInclusiverecord componentmaxInclusive- the value for themaxInclusiverecord 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 with thecomparemethod from their corresponding wrapper classes. -
mean
-
deviation
-
minInclusive
public int minInclusive()Returns the value of theminInclusiverecord component.- Returns:
- the value of the
minInclusiverecord component
-
maxInclusive
public int maxInclusive()Returns the value of themaxInclusiverecord component.- Returns:
- the value of the
maxInclusiverecord component
-