Record Class KhazConfig.Entry<T>
java.lang.Object
java.lang.Record
com.khazoda.core.KhazConfig.Entry<T>
- Enclosing class:
KhazConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadapter()Returns the value of theadapterrecord component.comment()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.booleanReturns the value of theserverSyncedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Entry
-
Entry
public Entry(String key, T defaultValue, String comment, KhazConfig.ValueAdapter<T> adapter, boolean serverSynced) Creates an instance of aEntryrecord class.- Parameters:
key- the value for thekeyrecord componentdefaultValue- the value for thedefaultValuerecord componentcomment- the value for thecommentrecord componentadapter- the value for theadapterrecord componentserverSynced- the value for theserverSyncedrecord component
-
-
Method Details
-
localOnly
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
defaultValue
Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-
comment
Returns the value of thecommentrecord component.- Returns:
- the value of the
commentrecord component
-
adapter
Returns the value of theadapterrecord component.- Returns:
- the value of the
adapterrecord component
-
serverSynced
public boolean serverSynced()Returns the value of theserverSyncedrecord component.- Returns:
- the value of the
serverSyncedrecord component
-