Record Class ConfigEntry<T>
java.lang.Object
java.lang.Record
net.tearpelato.craftcorelib.api.config.ConfigEntry<T>
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConfigEntry(String key, String path, ConfigEntry.Kind kind, T defaultValue, Object min, Object max, Predicate<Object> validator, List<String> comment, String translation, ConfigValue<T> value) Creates an instance of aConfigEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncomment()Returns the value of thecommentrecord component.Returns the value of thedefaultValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.kind()Returns the value of thekindrecord component.max()Returns the value of themaxrecord component.min()Returns the value of theminrecord component.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetranslationrecord component.Returns the value of thevalidatorrecord component.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
ConfigEntry
public ConfigEntry(String key, String path, ConfigEntry.Kind kind, T defaultValue, Object min, Object max, Predicate<Object> validator, List<String> comment, String translation, ConfigValue<T> value) Creates an instance of aConfigEntryrecord class.- Parameters:
key- the value for thekeyrecord componentpath- the value for thepathrecord componentkind- the value for thekindrecord componentdefaultValue- the value for thedefaultValuerecord componentmin- the value for theminrecord componentmax- the value for themaxrecord componentvalidator- the value for thevalidatorrecord componentcomment- the value for thecommentrecord componenttranslation- the value for thetranslationrecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
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). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
defaultValue
Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-
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
-
validator
-
comment
-
translation
Returns the value of thetranslationrecord component.- Returns:
- the value of the
translationrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-