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()floatend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Floatinitial()Returns the value of theinitialrecord component.@NotNull Stringkey()Returns the value of thekeyrecord component.@NotNull Componentlabel()Returns the value of thelabelrecord component.@NotNull StringReturns the value of thelabelFormatrecord component.floatstart()Returns the value of thestartrecord component.@Nullable Floatstep()Returns the value of thesteprecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord 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 aNumberRangerecord class.- Parameters:
key- the value for thekeyrecord componentwidth- the value for thewidthrecord componentlabel- the value for thelabelrecord componentlabelFormat- the value for thelabelFormatrecord componentstart- the value for thestartrecord componentend- the value for theendrecord componentinitial- the value for theinitialrecord componentstep- the value for thesteprecord 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
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
labelFormat
Returns the value of thelabelFormatrecord component.- Returns:
- the value of the
labelFormatrecord component
-
start
public float start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
public float end()Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
initial
Returns the value of theinitialrecord component.- Returns:
- the value of the
initialrecord component
-
step
Returns the value of thesteprecord component.- Returns:
- the value of the
steprecord component
-