Package info.u_team.u_team_core.util
Record Class ConfigValueHolder<V>
java.lang.Object
java.lang.Record
info.u_team.u_team_core.util.ConfigValueHolder<V>
-
Constructor Summary
ConstructorsConstructorDescriptionConfigValueHolder(Supplier<V> getter, Consumer<V> setter) Creates an instance of aConfigValueHolderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.get()getter()Returns the value of thegetterrecord component.final inthashCode()Returns a hash code value for this object.voidsetter()Returns the value of thesetterrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConfigValueHolder
Creates an instance of aConfigValueHolderrecord class.- Parameters:
getter- the value for thegetterrecord componentsetter- the value for thesetterrecord component
-
-
Method Details
-
get
-
set
-
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). -
getter
Returns the value of thegetterrecord component.- Returns:
- the value of the
getterrecord component
-
setter
Returns the value of thesetterrecord component.- Returns:
- the value of the
setterrecord component
-