Package net.neoforged.neoforge.oldtest
Record Class ConfigUITest.Common.Wrap<T>
java.lang.Object
java.lang.Record
net.neoforged.neoforge.oldtest.ConfigUITest.Common.Wrap<T>
- All Implemented Interfaces:
Supplier<T>
- Enclosing class:
ConfigUITest.Common
public static record ConfigUITest.Common.Wrap<T>(ModConfigSpec.ConfigValue<T> cfg)
extends Record
implements Supplier<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ModConfigSpec.ConfigValue
<T> The field for thecfg
record component. -
Constructor Summary
ConstructorsConstructorDescriptionWrap
(ModConfigSpec.ConfigValue<T> cfg) Creates an instance of aWrap
record class. -
Method Summary
Modifier and TypeMethodDescriptioncfg()
Returns the value of thecfg
record component.final boolean
Indicates whether some other object is "equal to" this one.get()
final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
cfg
The field for thecfg
record component.
-
-
Constructor Details
-
Wrap
Creates an instance of aWrap
record class.- Parameters:
cfg
- the value for thecfg
record component
-
-
Method Details
-
get
-
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)
. -
cfg
Returns the value of thecfg
record component.- Returns:
- the value of the
cfg
record component
-