Record Class TableBuilder.TableConstraints

java.lang.Object
java.lang.Record
me.deecaad.core.utils.TableBuilder.TableConstraints
Enclosing class:
TableBuilder

public static record TableBuilder.TableConstraints(int rows, int columns, int pixels) extends Record
Immutable class that defines the limits of a table (the maximum number of rows that can fit in chat, the requested number of columns, and the maximum number of pixels that can fit in 1 row).
  • Constructor Details

    • TableConstraints

      public TableConstraints(int rows, int columns, int pixels)
      Creates an instance of a TableConstraints record class.
      Parameters:
      rows - the value for the rows record component
      columns - the value for the columns record component
      pixels - the value for the pixels record component
  • Method Details

    • setRows

      @Contract(pure=true) @NotNull public @NotNull TableBuilder.TableConstraints setRows(int rows)
    • setColumns

      @Contract(pure=true) @NotNull public @NotNull TableBuilder.TableConstraints setColumns(int columns)
    • setPixels

      @Contract(pure=true) @NotNull public @NotNull TableBuilder.TableConstraints setPixels(int pixels)
    • 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. All components in this record class are compared with '=='.
      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.
    • rows

      public int rows()
      Returns the value of the rows record component.
      Returns:
      the value of the rows record component
    • columns

      public int columns()
      Returns the value of the columns record component.
      Returns:
      the value of the columns record component
    • pixels

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