Package net.minestom.server.utils
Record Class Range.Byte
java.lang.Object
java.lang.Record
net.minestom.server.utils.Range.Byte
-
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
ConstructorsConstructorDescriptionByte(byte minimum, byte maximum) Creates an instance of aByterecord 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.bytemaximum()Returns the value of themaximumrecord component.byteminimum()Returns the value of theminimumrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Byte
public Byte(byte minimum, byte maximum) Creates an instance of aByterecord 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 byte minimum()Returns the value of theminimumrecord component.- Returns:
- the value of the
minimumrecord component
-
maximum
public byte maximum()Returns the value of themaximumrecord component.- Returns:
- the value of the
maximumrecord component
-