Record Class ConfigRange<TYPE extends Comparable<TYPE>>
java.lang.Object
java.lang.Record
com.wildfire.common.config.validator.ConfigRange<TYPE>
- All Implemented Interfaces:
ConfigValidator<TYPE>
public record ConfigRange<TYPE extends Comparable<TYPE>>(TYPE extends Comparable<TYPE> minInclusive, TYPE extends Comparable<TYPE> maxInclusive)
extends Record
implements ConfigValidator<TYPE>
-
Constructor Summary
ConstructorsConstructorDescriptionConfigRange(TYPE minInclusive, TYPE maxInclusive) Creates an instance of aConfigRangerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.DataResult<TYPE> codecValidation(TYPE value) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themaxInclusiverecord component.Returns the value of theminInclusiverecord component.final StringtoString()Returns a string representation of this record class.booleanMethods inherited from interface ConfigValidator
hasCodecValidation
-
Constructor Details
-
ConfigRange
-
-
Method Details
-
validate
- Specified by:
validatein interfaceConfigValidator<TYPE extends Comparable<TYPE>>
-
codecValidation
- Specified by:
codecValidationin interfaceConfigValidator<TYPE extends Comparable<TYPE>>
-
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 withObjects::equals(Object,Object). -
minInclusive
Returns the value of theminInclusiverecord component.- Returns:
- the value of the
minInclusiverecord component
-
maxInclusive
Returns the value of themaxInclusiverecord component.- Returns:
- the value of the
maxInclusiverecord component
-