Record Class DialogInput.SingleOption
java.lang.Object
java.lang.Record
net.minestom.server.dialog.DialogInput.SingleOption
- All Implemented Interfaces:
DialogInput
- Enclosing interface:
DialogInput
public static record DialogInput.SingleOption(String key, int width, List<DialogInput.SingleOption.Option> options, Component label, boolean labelVisible)
extends Record
implements DialogInput
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface DialogInput
DialogInput.Boolean, DialogInput.NumberRange, DialogInput.SingleOption, DialogInput.Text -
Field Summary
FieldsFields inherited from interface DialogInput
DEFAULT_WIDTH, REGISTRY -
Constructor Summary
ConstructorsConstructorDescriptionSingleOption(String key, int width, List<DialogInput.SingleOption.Option> options, Component label, boolean labelVisible) Creates an instance of aSingleOptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionStructCodec<? extends DialogInput> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.label()Returns the value of thelabelrecord component.booleanReturns the value of thelabelVisiblerecord component.options()Returns the value of theoptionsrecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
SingleOption
public SingleOption(String key, int width, List<DialogInput.SingleOption.Option> options, Component label, boolean labelVisible) Creates an instance of aSingleOptionrecord class.- Parameters:
key- the value for thekeyrecord componentwidth- the value for thewidthrecord componentoptions- the value for theoptionsrecord componentlabel- the value for thelabelrecord componentlabelVisible- the value for thelabelVisiblerecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceDialogInput
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
options
Returns the value of theoptionsrecord component.- Returns:
- the value of the
optionsrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
labelVisible
public boolean labelVisible()Returns the value of thelabelVisiblerecord component.- Returns:
- the value of the
labelVisiblerecord component
-