Record Class PaperPageMenu<T>
java.lang.Object
java.lang.Record
studio.mevera.lotus.paper.internal.pagination.PaperPageMenu<T>
- All Implemented Interfaces:
studio.mevera.lotus.api.menu.InteractiveMenu<net.kyori.adventure.text.Component>,studio.mevera.lotus.api.menu.Menu<net.kyori.adventure.text.Component>,studio.mevera.lotus.api.menu.MenuHandler<net.kyori.adventure.text.Component>,PaperInteractiveMenu
public record PaperPageMenu<T>(@NotNull PaperPaginationSession<T> session, int pageIndex)
extends Record
implements PaperInteractiveMenu
Synthesised page menu backed by a
PaperPageLayout. Returns Adventure
Component titles with no serialization round-trip.-
Constructor Summary
ConstructorsConstructorDescriptionPaperPageMenu(@NotNull PaperPaginationSession<T> session, int pageIndex) Creates an instance of aPaperPageMenurecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull studio.mevera.lotus.api.slot.Capacitycapacity(@NotNull studio.mevera.lotus.api.menu.MenuView<net.kyori.adventure.text.Component, ?> view) @NotNull studio.mevera.lotus.api.content.Contentcontent(@NotNull studio.mevera.lotus.api.menu.MenuView<net.kyori.adventure.text.Component, ?> view) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringname()intReturns the value of thepageIndexrecord component.@NotNull PaperPaginationSession<T> session()Returns the value of thesessionrecord component.@NotNull net.kyori.adventure.text.Componenttitle(@NotNull studio.mevera.lotus.api.menu.MenuView<net.kyori.adventure.text.Component, ?> view) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface studio.mevera.lotus.api.menu.Menu
typeMethods inherited from interface studio.mevera.lotus.api.menu.MenuHandler
onClose, onDrag, onOpen, onPostClick, onPreClick
-
Constructor Details
-
PaperPageMenu
Creates an instance of aPaperPageMenurecord class.- Parameters:
session- the value for thesessionrecord componentpageIndex- the value for thepageIndexrecord component
-
-
Method Details
-
name
- Specified by:
namein interfacestudio.mevera.lotus.api.menu.Menu<T>
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
session
Returns the value of thesessionrecord component.- Returns:
- the value of the
sessionrecord component
-
pageIndex
public int pageIndex()Returns the value of thepageIndexrecord component.- Returns:
- the value of the
pageIndexrecord component