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 booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleaninitial()Returns the value of theinitialrecord component.@NotNull Stringkey()Returns the value of thekeyrecord component.@NotNull Componentlabel()Returns the value of thelabelrecord component.@NotNull StringonFalse()Returns the value of theonFalserecord component.@NotNull StringonTrue()Returns the value of theonTruerecord component.final StringtoString()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 aBooleanrecord class.- Parameters:
key- the value for thekeyrecord componentlabel- the value for thelabelrecord componentinitial- the value for theinitialrecord componentonTrue- the value for theonTruerecord componentonFalse- the value for theonFalserecord component
-
-
Method Details
-
codec
- Specified by:
codecin 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 thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
initial
public boolean initial()Returns the value of theinitialrecord component.- Returns:
- the value of the
initialrecord component
-
onTrue
Returns the value of theonTruerecord component.- Returns:
- the value of the
onTruerecord component
-
onFalse
Returns the value of theonFalserecord component.- Returns:
- the value of the
onFalserecord component
-