Package net.minestom.server.dialog
Record Class DialogInput.NumberRange
java.lang.Object
java.lang.Record
net.minestom.server.dialog.DialogInput.NumberRange
- 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()
float
end()
Returns the value of theend
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@Nullable Float
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
Returns the value of thelabelFormat
record component.float
start()
Returns the value of thestart
record component.@Nullable Float
step()
Returns the value of thestep
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
-
NumberRange
public NumberRange(@NotNull @NotNull String key, int width, @NotNull @NotNull Component label, @NotNull @NotNull String labelFormat, float start, float end, @Nullable @Nullable Float initial, @Nullable @Nullable Float step) Creates an instance of aNumberRange
record class.- Parameters:
key
- the value for thekey
record componentwidth
- the value for thewidth
record componentlabel
- the value for thelabel
record componentlabelFormat
- the value for thelabelFormat
record componentstart
- the value for thestart
record componentend
- the value for theend
record componentinitial
- the value for theinitial
record componentstep
- the value for thestep
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
-
labelFormat
Returns the value of thelabelFormat
record component.- Returns:
- the value of the
labelFormat
record component
-
start
public float start()Returns the value of thestart
record component.- Returns:
- the value of the
start
record component
-
end
public float end()Returns the value of theend
record component.- Returns:
- the value of the
end
record component
-
initial
Returns the value of theinitial
record component.- Returns:
- the value of the
initial
record component
-
step
Returns the value of thestep
record component.- Returns:
- the value of the
step
record component
-