Record Class GuiFragment
java.lang.Object
java.lang.Record
com.render.api.gui.pagination.GuiFragment
- Record Components:
source- retained application sourcebounds- design-space fragment boundskind- fragment rolefragmentIndex- zero-based fragment index for the sourcepageIndex- zero-based page index, or-1columnIndex- zero-based column index, or-1first- first source fragmentlast- last source fragmentdecorationBreak- 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 Summary
ConstructorsConstructorDescriptionGuiFragment(GuiComponent<?> source, GuiRect bounds, GuiFragmentKind kind, int fragmentIndex, int pageIndex, int columnIndex, boolean first, boolean last, GuiBoxDecorationBreak decorationBreak) Creates an instance of aGuiFragmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbounds()Returns the value of theboundsrecord component.intReturns the value of thecolumnIndexrecord component.Returns the value of thedecorationBreakrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfirst()Returns the value of thefirstrecord component.intReturns the value of thefragmentIndexrecord component.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.booleanlast()Returns the value of thelastrecord component.intReturns the value of thepageIndexrecord component.GuiComponent<?> source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
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 aGuiFragmentrecord class.- Parameters:
source- the value for thesourcerecord componentbounds- the value for theboundsrecord componentkind- the value for thekindrecord componentfragmentIndex- the value for thefragmentIndexrecord componentpageIndex- the value for thepageIndexrecord componentcolumnIndex- the value for thecolumnIndexrecord componentfirst- the value for thefirstrecord componentlast- the value for thelastrecord componentdecorationBreak- the value for thedecorationBreakrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
source
-
bounds
-
kind
-
fragmentIndex
public int fragmentIndex()Returns the value of thefragmentIndexrecord component.- Returns:
- the value of the
fragmentIndexrecord component
-
pageIndex
-
columnIndex
public int columnIndex()Returns the value of thecolumnIndexrecord component.- Returns:
- the value of the
columnIndexrecord component
-
first
-
last
-
decorationBreak
Returns the value of thedecorationBreakrecord component.- Returns:
- the value of the
decorationBreakrecord component
-