Package me.deecaad.core.utils
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 Summary
ConstructorsConstructorDescriptionTableConstraints(int rows, int columns, int pixels) Creates an instance of aTableConstraintsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcolumns()Returns the value of thecolumnsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intpixels()Returns the value of thepixelsrecord component.introws()Returns the value of therowsrecord component.@NotNull TableBuilder.TableConstraintssetColumns(int columns) @NotNull TableBuilder.TableConstraintssetPixels(int pixels) @NotNull TableBuilder.TableConstraintssetRows(int rows) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TableConstraints
public TableConstraints(int rows, int columns, int pixels) Creates an instance of aTableConstraintsrecord class.- Parameters:
rows- the value for therowsrecord componentcolumns- the value for thecolumnsrecord componentpixels- the value for thepixelsrecord component
-
-
Method Details
-
setRows
-
setColumns
-
setPixels
-
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. All components in this record class are compared with '=='. -
rows
public int rows()Returns the value of therowsrecord component.- Returns:
- the value of the
rowsrecord component
-
columns
public int columns()Returns the value of thecolumnsrecord component.- Returns:
- the value of the
columnsrecord component
-
pixels
public int pixels()Returns the value of thepixelsrecord component.- Returns:
- the value of the
pixelsrecord component
-