Record Class IntProvider.Trapezoid
java.lang.Object
java.lang.Record
net.minestom.server.utils.IntProvider.Trapezoid
- All Implemented Interfaces:
IntProvider
- Enclosing interface:
IntProvider
public static record IntProvider.Trapezoid(int minInclusive, int maxInclusive, int plateau)
extends Record
implements IntProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface IntProvider
IntProvider.BiasedToBottom, IntProvider.Clamped, IntProvider.ClampedNormal, IntProvider.Constant, IntProvider.Trapezoid, IntProvider.Uniform, IntProvider.Weighted -
Field Summary
FieldsFields inherited from interface IntProvider
REGISTRY, REGISTRY_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionTrapezoid(int minInclusive, int maxInclusive, int plateau) Creates an instance of aTrapezoidrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncodec()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.intReturns the value of theminInclusiverecord component.intplateau()Returns the value of theplateaurecord component.intfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Trapezoid
public Trapezoid(int minInclusive, int maxInclusive, int plateau) Creates an instance of aTrapezoidrecord class.- Parameters:
minInclusive- the value for theminInclusiverecord componentmaxInclusive- the value for themaxInclusiverecord componentplateau- the value for theplateaurecord component
-
-
Method Details
-
sample
- Specified by:
samplein interfaceIntProvider
-
codec
- Specified by:
codecin interfaceIntProvider
-
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. -
minInclusive
public int minInclusive()Returns the value of theminInclusiverecord component.- Specified by:
minInclusivein interfaceIntProvider- Returns:
- the value of the
minInclusiverecord component
-
maxInclusive
public int maxInclusive()Returns the value of themaxInclusiverecord component.- Specified by:
maxInclusivein interfaceIntProvider- Returns:
- the value of the
maxInclusiverecord component
-
plateau
public int plateau()Returns the value of theplateaurecord component.- Returns:
- the value of the
plateaurecord component
-