Record Class DialogModel.Text

java.lang.Object
java.lang.Record
com.ultikits.ultitools.ui.dialog.DialogModel.Text
Record Components:
key - input key
label - rendered label
initial - initial text
maxLength - maximum UTF-16 length
maxLines - maximum line count
All Implemented Interfaces:
DialogModel.Input
Enclosing class:
DialogModel

@Internal public static record DialogModel.Text(String key, net.kyori.adventure.text.Component label, String initial, int maxLength, int maxLines) extends Record implements DialogModel.Input
Text control.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
    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 int
    The field for the maxLength record component.
    private final int
    The field for the maxLines record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Text(String key, net.kyori.adventure.text.Component label, String initial, int maxLength, int maxLines)
    Creates an instance of a Text record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    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.
    int
    Returns the value of the maxLength record component.
    int
    Returns the value of the maxLines 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.
    • initial

      private final String initial
      The field for the initial record component.
    • maxLength

      private final int maxLength
      The field for the maxLength record component.
    • maxLines

      private final int maxLines
      The field for the maxLines record component.
  • Constructor Details

    • Text

      public Text(String key, net.kyori.adventure.text.Component label, String initial, int maxLength, int maxLines)
      Creates an instance of a Text record class.
      Parameters:
      key - the value for the key record component
      label - the value for the label record component
      initial - the value for the initial record component
      maxLength - the value for the maxLength record component
      maxLines - the value for the maxLines 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
    • initial

      public String initial()
      Returns the value of the initial record component.
      Returns:
      the value of the initial record component
    • maxLength

      public int maxLength()
      Returns the value of the maxLength record component.
      Returns:
      the value of the maxLength record component
    • maxLines

      public int maxLines()
      Returns the value of the maxLines record component.
      Returns:
      the value of the maxLines record component