Record Class PageInfo
java.lang.Object
java.lang.Record
org.patternfly.component.pagination.PageInfo
Immutable pagination state: current page (1-based), page size, and total item count.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionPageInfo(int page, int pageSize, int total) Creates an instance of aPageInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intfrom()final inthashCode()Returns a hash code value for this object.booleanbooleanstatic PageInfostatic PageInfoindeterminate(int pageSize) booleanbooleanbooleanlastPage()nextPage()static PageInfonoItems()static PageInfoof(int total) static PageInfoof(int pageSize, int total) intpage()Returns the value of thepagerecord component.intpages()intpageSize()Returns the value of thepageSizerecord component.intto()toString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.withPage(int page) withPageSize(int pageSize) withTotal(int total)
-
Field Details
-
UNKNOWN
public static final int UNKNOWN- See Also:
-
FIRST_PAGE
public static final int FIRST_PAGE- See Also:
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZE- See Also:
-
-
Constructor Details
-
PageInfo
public PageInfo(int page, int pageSize, int total) Creates an instance of aPageInforecord class.- Parameters:
page- the value for thepagerecord componentpageSize- the value for thepageSizerecord componenttotal- the value for thetotalrecord component
-
-
Method Details
-
noItems
-
indeterminate
-
indeterminate
-
of
-
of
-
toString
-
pages
public int pages() -
from
public int from() -
to
public int to() -
isIndeterminate
public boolean isIndeterminate() -
isFirstPage
public boolean isFirstPage() -
isLastPage
public boolean isLastPage() -
hasPreviousPage
public boolean hasPreviousPage() -
hasNextPage
public boolean hasNextPage() -
firstPage
-
previousPage
-
nextPage
-
lastPage
-
withPage
-
withPageSize
-
withTotal
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
page
public int page()Returns the value of thepagerecord component.- Returns:
- the value of the
pagerecord component
-
pageSize
public int pageSize()Returns the value of thepageSizerecord component.- Returns:
- the value of the
pageSizerecord component
-
total
public int total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-