Record Class PaginationLinks
java.lang.Object
java.lang.Record
de.z0rdak.yawp.util.text.messages.pagination.PaginationLinks
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPaginationLinks(String command, int pageNumber, int pageSize, int numberOfPages) Creates an instance of aPaginationLinksrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.chat.MutableComponentbuildFirstLinkArrow(String cmd, int pageNo, boolean hasMultiplePages) net.minecraft.network.chat.MutableComponentbuildLastLinkArrow(String cmd, int pageNo, int numberOfPages, boolean hasMultiplePages) net.minecraft.network.chat.MutableComponentbuildNextLinkArrow(String cmd, int pageNo, int numberOfPages, boolean hasMultiplePages) buildPageCommand(String cmd, int page) net.minecraft.network.chat.MutableComponentbuildPrevLinkArrow(String cmd, int pageNo, boolean hasMultiplePages) command()Returns the value of thecommandrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thenumberOfPagesrecord component.intReturns the value of thepageNumberrecord component.intpageSize()Returns the value of thepageSizerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
FIRST_PAGE_IDX
public static int FIRST_PAGE_IDX
-
-
Constructor Details
-
PaginationLinks
Creates an instance of aPaginationLinksrecord class.- Parameters:
command- the value for thecommandrecord componentpageNumber- the value for thepageNumberrecord componentpageSize- the value for thepageSizerecord componentnumberOfPages- the value for thenumberOfPagesrecord component
-
-
Method Details
-
buildPageCommand
-
buildLastLinkArrow
public net.minecraft.network.chat.MutableComponent buildLastLinkArrow(String cmd, int pageNo, int numberOfPages, boolean hasMultiplePages) -
buildNextLinkArrow
public net.minecraft.network.chat.MutableComponent buildNextLinkArrow(String cmd, int pageNo, int numberOfPages, boolean hasMultiplePages) -
buildPrevLinkArrow
public net.minecraft.network.chat.MutableComponent buildPrevLinkArrow(String cmd, int pageNo, boolean hasMultiplePages) -
buildFirstLinkArrow
public net.minecraft.network.chat.MutableComponent buildFirstLinkArrow(String cmd, int pageNo, boolean hasMultiplePages) -
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 '=='. -
command
Returns the value of thecommandrecord component.- Returns:
- the value of the
commandrecord component
-
pageNumber
public int pageNumber()Returns the value of thepageNumberrecord component.- Returns:
- the value of the
pageNumberrecord component
-
pageSize
public int pageSize()Returns the value of thepageSizerecord component.- Returns:
- the value of the
pageSizerecord component
-
numberOfPages
public int numberOfPages()Returns the value of thenumberOfPagesrecord component.- Returns:
- the value of the
numberOfPagesrecord component
-