Record Class OptionsList.OptionInstanceWidget
java.lang.Object
java.lang.Record
net.minecraft.client.gui.components.OptionsList.OptionInstanceWidget
- Enclosing class:
OptionsList
public static record OptionsList.OptionInstanceWidget(AbstractWidget widget, @Nullable OptionInstance<?> optionInstance)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable OptionInstance<?> The field for theoptionInstancerecord component.private final AbstractWidgetThe field for thewidgetrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionOptionInstanceWidget(AbstractWidget widget) OptionInstanceWidget(AbstractWidget widget, @Nullable OptionInstance<?> optionInstance) Creates an instance of aOptionInstanceWidgetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable OptionInstance<?> Returns the value of theoptionInstancerecord component.final StringtoString()Returns a string representation of this record class.widget()Returns the value of thewidgetrecord component.
-
Field Details
-
widget
The field for thewidgetrecord component. -
optionInstance
The field for theoptionInstancerecord component.
-
-
Constructor Details
-
OptionInstanceWidget
-
OptionInstanceWidget
Creates an instance of aOptionInstanceWidgetrecord class.- Parameters:
widget- the value for thewidgetrecord componentoptionInstance- the value for theoptionInstancerecord 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). -
widget
Returns the value of thewidgetrecord component.- Returns:
- the value of the
widgetrecord component
-
optionInstance
Returns the value of theoptionInstancerecord component.- Returns:
- the value of the
optionInstancerecord component
-