Record Class DialogModel.Range

java.lang.Object
java.lang.Record
com.ultikits.ultitools.ui.dialog.DialogModel.Range
Record Components:
key - input key
label - rendered label
start - inclusive minimum
end - inclusive maximum
step - positive increment
initial - initial value
All Implemented Interfaces:
DialogModel.Input
Enclosing class:
DialogModel

@Internal public static record DialogModel.Range(String key, net.kyori.adventure.text.Component label, float start, float end, float step, float initial) extends Record implements DialogModel.Input
Single-precision numeric control.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final float
    The field for the end record component.
    private final float
    The field for the initial record component.
    private final String
    The field for the key record component.
    private final net.kyori.adventure.text.Component
    The field for the label record component.
    private final float
    The field for the start record component.
    private final float
    The field for the step record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Range(String key, net.kyori.adventure.text.Component label, float start, float end, float step, float initial)
    Creates an instance of a Range record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    end()
    Returns the value of the end record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    float
    Returns the value of the initial record component.
    key()
    Returns the value of the key record component.
    net.kyori.adventure.text.Component
    Returns the value of the label record component.
    float
    Returns the value of the start record component.
    float
    Returns the value of the step record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • key

      private final String key
      The field for the key record component.
    • label

      private final net.kyori.adventure.text.Component label
      The field for the label record component.
    • start

      private final float start
      The field for the start record component.
    • end

      private final float end
      The field for the end record component.
    • step

      private final float step
      The field for the step record component.
    • initial

      private final float initial
      The field for the initial record component.
  • Constructor Details

    • Range

      public Range(String key, net.kyori.adventure.text.Component label, float start, float end, float step, float initial)
      Creates an instance of a Range record class.
      Parameters:
      key - the value for the key record component
      label - the value for the label record component
      start - the value for the start record component
      end - the value for the end record component
      step - the value for the step record component
      initial - the value for the initial record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • key

      public String key()
      Returns the value of the key record component.
      Specified by:
      key in interface DialogModel.Input
      Returns:
      the value of the key record component
    • label

      public net.kyori.adventure.text.Component label()
      Returns the value of the label record component.
      Specified by:
      label in interface DialogModel.Input
      Returns:
      the value of the label record component
    • start

      public float start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • end

      public float end()
      Returns the value of the end record component.
      Returns:
      the value of the end record component
    • step

      public float step()
      Returns the value of the step record component.
      Returns:
      the value of the step record component
    • initial

      public float initial()
      Returns the value of the initial record component.
      Returns:
      the value of the initial record component