Package net.minestom.server.dialog
Record Class DialogInput.Text
java.lang.Object
java.lang.Record
net.minestom.server.dialog.DialogInput.Text
- All Implemented Interfaces:
DialogInput
- Enclosing interface:
DialogInput
public static record DialogInput.Text(@NotNull String key, int width, @NotNull Component label, boolean labelVisible, @NotNull String initial, int maxLength, @Nullable DialogInput.Text.Multiline multiline)
extends Record
implements DialogInput
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minestom.server.dialog.DialogInput
DialogInput.Boolean, DialogInput.NumberRange, DialogInput.SingleOption, DialogInput.Text
-
Field Summary
FieldsFields inherited from interface net.minestom.server.dialog.DialogInput
DEFAULT_WIDTH, REGISTRY
-
Constructor Summary
ConstructorsConstructorDescriptionText
(@NotNull String key, int width, @NotNull Component label, boolean labelVisible, @NotNull String initial, int maxLength, @Nullable DialogInput.Text.Multiline multiline) Creates an instance of aText
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StructCodec
<? extends DialogInput> codec()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull String
initial()
Returns the value of theinitial
record component.@NotNull String
key()
Returns the value of thekey
record component.@NotNull Component
label()
Returns the value of thelabel
record component.boolean
Returns the value of thelabelVisible
record component.int
Returns the value of themaxLength
record component.@Nullable DialogInput.Text.Multiline
Returns the value of themultiline
record component.final String
toString()
Returns a string representation of this record class.int
width()
Returns the value of thewidth
record component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Text
public Text(@NotNull @NotNull String key, int width, @NotNull @NotNull Component label, boolean labelVisible, @NotNull @NotNull String initial, int maxLength, @Nullable @Nullable DialogInput.Text.Multiline multiline) Creates an instance of aText
record class.- Parameters:
key
- the value for thekey
record componentwidth
- the value for thewidth
record componentlabel
- the value for thelabel
record componentlabelVisible
- the value for thelabelVisible
record componentinitial
- the value for theinitial
record componentmaxLength
- the value for themaxLength
record componentmultiline
- the value for themultiline
record component
-
-
Method Details
-
codec
- Specified by:
codec
in interfaceDialogInput
-
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 '=='. -
key
Returns the value of thekey
record component.- Returns:
- the value of the
key
record component
-
width
public int width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
label
Returns the value of thelabel
record component.- Returns:
- the value of the
label
record component
-
labelVisible
public boolean labelVisible()Returns the value of thelabelVisible
record component.- Returns:
- the value of the
labelVisible
record component
-
initial
Returns the value of theinitial
record component.- Returns:
- the value of the
initial
record component
-
maxLength
public int maxLength()Returns the value of themaxLength
record component.- Returns:
- the value of the
maxLength
record component
-
multiline
Returns the value of themultiline
record component.- Returns:
- the value of the
multiline
record component
-