Class Page<T>
java.lang.Object
com.e1c.langtool.history.db.pagination.Page<T>
Basic implementation of a page.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the page content.intReturns the number of elements this page contains.intReturns the number of current page.Returns the pageable object are associated with this page.intgetSize()Returns the size of this page.longReturns the total amount of elements.inthashCode()iterator()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Page
Creates a new page with content is slice in range from 0 to the given pageable size.- Parameters:
content- the data is stored in this pagepageable- the pageable object with which this page is associatedtotal- the total amount of elements- Throws:
IllegalArgumentException- if (pageable size < 0) or (total amount < 0) or (pageable size > total) or content size is less then pageable size
-
-
Method Details
-
iterator
-
getSize
public int getSize()Description copied from interface:IPageReturns the size of this page. -
getNumber
public int getNumber()Description copied from interface:IPageReturns the number of current page. -
getContentSize
public int getContentSize()Description copied from interface:IPageReturns the number of elements this page contains.- Specified by:
getContentSizein interfaceIPage<T>- Returns:
- he number of elements this page contains
-
getTotalSize
public long getTotalSize()Description copied from interface:IPageReturns the total amount of elements.- Specified by:
getTotalSizein interfaceIPage<T>- Returns:
- the total amount of elements
-
getContent
Description copied from interface:IPageReturns the page content.- Specified by:
getContentin interfaceIPage<T>- Returns:
- the page content
-
getPageable
Description copied from interface:IPageReturns the pageable object are associated with this page.- Specified by:
getPageablein interfaceIPage<T>- Returns:
- associated pageable object
-
hashCode
public int hashCode() -
equals
-
toString
-