Package net.minestom.server.utils
Record Class Range.Float
java.lang.Object
java.lang.Record
net.minestom.server.utils.Range.Float
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.utils.Range
Range.Byte, Range.Double, Range.Float, Range.Integer, Range.Long, Range.Short -
Constructor Summary
ConstructorsConstructorDescriptionFloat(float minimum, float maximum) Creates an instance of aFloatrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanWhether the givenvalueis in range of the minimum and the maximum.floatmaximum()Returns the value of themaximumrecord component.floatminimum()Returns the value of theminimumrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Float
public Float(float minimum, float maximum) Creates an instance of aFloatrecord class.- Parameters:
minimum- the value for theminimumrecord componentmaximum- the value for themaximumrecord component
-
-
Method Details
-
isInRange
Description copied from interface:RangeWhether the givenvalueis in range of the minimum and the maximum. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
minimum
public float minimum()Returns the value of theminimumrecord component.- Returns:
- the value of the
minimumrecord component
-
maximum
public float maximum()Returns the value of themaximumrecord component.- Returns:
- the value of the
maximumrecord component
-