Record Class GuiFragment

java.lang.Object
java.lang.Record
com.render.api.gui.pagination.GuiFragment
Record Components:
source - retained application source
bounds - design-space fragment bounds
kind - fragment role
fragmentIndex - zero-based fragment index for the source
pageIndex - zero-based page index, or -1
columnIndex - zero-based column index, or -1
first - first source fragment
last - last source fragment
decorationBreak - clone/slice decoration behavior

public record GuiFragment(GuiComponent<?> source, GuiRect bounds, GuiFragmentKind kind, int fragmentIndex, int pageIndex, int columnIndex, boolean first, boolean last, GuiBoxDecorationBreak decorationBreak) extends Record
One immutable mapping from a retained source to page/column geometry.
  • Constructor Details

    • GuiFragment

      public GuiFragment(GuiComponent<?> source, GuiRect bounds, GuiFragmentKind kind, int fragmentIndex, int pageIndex, int columnIndex, boolean first, boolean last, GuiBoxDecorationBreak decorationBreak)
      Creates an instance of a GuiFragment record class.
      Parameters:
      source - the value for the source record component
      bounds - the value for the bounds record component
      kind - the value for the kind record component
      fragmentIndex - the value for the fragmentIndex record component
      pageIndex - the value for the pageIndex record component
      columnIndex - the value for the columnIndex record component
      first - the value for the first record component
      last - the value for the last record component
      decorationBreak - the value for the decorationBreak 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.
    • source

      public GuiComponent<?> source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • bounds

      public GuiRect bounds()
      Returns the value of the bounds record component.
      Returns:
      the value of the bounds record component
    • kind

      public GuiFragmentKind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • fragmentIndex

      public int fragmentIndex()
      Returns the value of the fragmentIndex record component.
      Returns:
      the value of the fragmentIndex record component
    • pageIndex

      public int pageIndex()
      Returns the value of the pageIndex record component.
      Returns:
      the value of the pageIndex record component
    • columnIndex

      public int columnIndex()
      Returns the value of the columnIndex record component.
      Returns:
      the value of the columnIndex record component
    • first

      public boolean first()
      Returns the value of the first record component.
      Returns:
      the value of the first record component
    • last

      public boolean last()
      Returns the value of the last record component.
      Returns:
      the value of the last record component
    • decorationBreak

      public GuiBoxDecorationBreak decorationBreak()
      Returns the value of the decorationBreak record component.
      Returns:
      the value of the decorationBreak record component