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 Component
The field for thename
record component.private final @Nullable OptionInstance
<?> The field for theoption
record component.private final @Nullable Component
The field for thetooltip
record component.private final boolean
The field for theundoable
record component.private final @Nullable AbstractWidget
The field for thewidget
record component. -
Constructor Summary
ConstructorsConstructorDescriptionElement
(@Nullable Component name, @Nullable Component tooltip, @Nullable AbstractWidget widget, @Nullable OptionInstance<?> option, boolean undoable) Creates an instance of aElement
record 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 Object
any()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@Nullable Component
name()
Returns the value of thename
record component.@Nullable OptionInstance
<?> option()
Returns the value of theoption
record component.@Nullable Component
tooltip()
Returns the value of thetooltip
record component.final String
toString()
Returns a string representation of this record class.boolean
undoable()
Returns the value of theundoable
record component.@Nullable AbstractWidget
widget()
Returns the value of thewidget
record component.
-
Field Details
-
name
The field for thename
record component. -
tooltip
The field for thetooltip
record component. -
widget
The field for thewidget
record component. -
option
The field for theoption
record component. -
undoable
private final boolean undoableThe field for theundoable
record 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 aElement
record class.- Parameters:
name
- the value for thename
record componenttooltip
- the value for thetooltip
record componentwidget
- the value for thewidget
record componentoption
- the value for theoption
record componentundoable
- the value for theundoable
record 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 thename
record component.- Returns:
- the value of the
name
record component
-
tooltip
Returns the value of thetooltip
record component.- Returns:
- the value of the
tooltip
record component
-
widget
Returns the value of thewidget
record component.- Returns:
- the value of the
widget
record component
-
option
Returns the value of theoption
record component.- Returns:
- the value of the
option
record component
-
undoable
public boolean undoable()Returns the value of theundoable
record component.- Returns:
- the value of the
undoable
record component
-