Record Class ConfigurationScreen.ConfigurationSectionScreen.Element
java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.gui.ConfigurationScreen.ConfigurationSectionScreen.Element
- Enclosing class:
ConfigurationScreen.ConfigurationSectionScreen
public static record ConfigurationScreen.ConfigurationSectionScreen.Element(@Nullable Component name, @Nullable Component tooltip, @Nullable AbstractWidget widget, @Nullable OptionInstance<?> option, boolean undoable)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable ComponentThe field for thenamerecord component.private final @Nullable OptionInstance<?> The field for theoptionrecord component.private final @Nullable ComponentThe field for thetooltiprecord component.private final booleanThe field for theundoablerecord component.private final @Nullable AbstractWidgetThe field for thewidgetrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionElement(@Nullable Component name, @Nullable Component tooltip, @Nullable AbstractWidget widget, @Nullable OptionInstance<?> option, boolean undoable) Creates an instance of aElementrecord class.Element(@Nullable Component name, @Nullable Component tooltip, AbstractWidget widget) Element(@Nullable Component name, @Nullable Component tooltip, AbstractWidget widget, boolean undoable) Element(Component name, Component tooltip, OptionInstance<?> option) Element(Component name, Component tooltip, OptionInstance<?> option, boolean undoable) -
Method Summary
Modifier and TypeMethodDescription@Nullable Objectany()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Componentname()Returns the value of thenamerecord component.@Nullable OptionInstance<?> option()Returns the value of theoptionrecord component.@Nullable Componenttooltip()Returns the value of thetooltiprecord component.final StringtoString()Returns a string representation of this record class.booleanundoable()Returns the value of theundoablerecord component.@Nullable AbstractWidgetwidget()Returns the value of thewidgetrecord component.
-
Field Details
-
name
The field for thenamerecord component. -
tooltip
The field for thetooltiprecord component. -
widget
The field for thewidgetrecord component. -
option
The field for theoptionrecord component. -
undoable
private final boolean undoableThe field for theundoablerecord component.
-
-
Constructor Details
-
Element
@Internal public Element(@Nullable @Nullable Component name, @Nullable @Nullable Component tooltip, @Nullable @Nullable AbstractWidget widget, @Nullable @Nullable OptionInstance<?> option, boolean undoable) Creates an instance of aElementrecord class.- Parameters:
name- the value for thenamerecord componenttooltip- the value for thetooltiprecord componentwidget- the value for thewidgetrecord componentoption- the value for theoptionrecord componentundoable- the value for theundoablerecord component
-
Element
public Element(@Nullable @Nullable Component name, @Nullable @Nullable Component tooltip, AbstractWidget widget) -
Element
public Element(@Nullable @Nullable Component name, @Nullable @Nullable Component tooltip, AbstractWidget widget, boolean undoable) -
Element
-
Element
-
-
Method Details
-
getWidget
-
any
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
tooltip
Returns the value of thetooltiprecord component.- Returns:
- the value of the
tooltiprecord component
-
widget
Returns the value of thewidgetrecord component.- Returns:
- the value of the
widgetrecord component
-
option
Returns the value of theoptionrecord component.- Returns:
- the value of the
optionrecord component
-
undoable
public boolean undoable()Returns the value of theundoablerecord component.- Returns:
- the value of the
undoablerecord component
-