Record Class ConfigValueRange<T>
java.lang.Object
java.lang.Record
net.mezzdev.config.api.value.serializer.ConfigValueRange<T>
- Record Components:
min- smallest valid valuemax- largest valid value
Inclusive lower and upper bounds for a config value.
Returned by IConfigValueSerializer.getRange() when a config value should be edited as a bounded range.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionConfigValueRange(T min, T max) Validate and create an inclusive config value range. -
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.max()Returns the value of themaxrecord component.min()Returns the value of theminrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConfigValueRange
Validate and create an inclusive config value range.- Parameters:
min- smallest valid valuemax- largest valid value- Since:
- 0.1.0
-
-
Method Details
-
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 withObjects::equals(Object,Object). -
min
Returns the value of theminrecord component.- Returns:
- the value of the
minrecord component
-
max
Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-