Package net.minestom.server.dialog
Record Class DialogInput.Boolean
java.lang.Object
java.lang.Record
net.minestom.server.dialog.DialogInput.Boolean
- All Implemented Interfaces:
DialogInput
- Enclosing interface:
DialogInput
-
Nested Class Summary
Nested 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
Constructors -
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.boolean
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.@NotNull String
onFalse()
Returns the value of theonFalse
record component.@NotNull String
onTrue()
Returns the value of theonTrue
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Boolean
public Boolean(@NotNull @NotNull String key, @NotNull @NotNull Component label, boolean initial, @NotNull @NotNull String onTrue, @NotNull @NotNull String onFalse) Creates an instance of aBoolean
record class.- Parameters:
key
- the value for thekey
record componentlabel
- the value for thelabel
record componentinitial
- the value for theinitial
record componentonTrue
- the value for theonTrue
record componentonFalse
- the value for theonFalse
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
-
label
Returns the value of thelabel
record component.- Returns:
- the value of the
label
record component
-
initial
public boolean initial()Returns the value of theinitial
record component.- Returns:
- the value of the
initial
record component
-
onTrue
Returns the value of theonTrue
record component.- Returns:
- the value of the
onTrue
record component
-
onFalse
Returns the value of theonFalse
record component.- Returns:
- the value of the
onFalse
record component
-