case class Page(pageNumber: Int, pageSize: Int, totalResults: Int, numberOfResults: Int) extends Product with Serializable
A Page represents a slice of objects from some collection. A collection can be broken down into n pages, each with k results, with the last page containing j <= k results.
A Page is 1-indexed.
- pageNumber
the page number represented by this page. 1 indexed.
- pageSize
the max number of results per page.
- totalResults
the total number of results in the underlying collection
- numberOfResults
the number of results in this page, which is always <= pageSize
- Alphabetic
- By Inheritance
- Page
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Page(pageNumber: Int, pageSize: Int, totalResults: Int, numberOfResults: Int)
- pageNumber
the page number represented by this page. 1 indexed.
- pageSize
the max number of results per page.
- totalResults
the total number of results in the underlying collection
- numberOfResults
the number of results in this page, which is always <= pageSize
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
end: Int
- returns
the index of the last result on this page as a 0-indexed number. For example, to for pages of size 20, will be 19, 39, 59, ...
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
first: Int
- returns
the position of the first result on this page as a 1-indexed number. For example, first for pages of size 20 will be 1, 21, 41, ...
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
last: Int
- returns
the position of the last result on this page as 1-indexed number. For example, last for pages of size 20 will be 20, 40, 60, ....
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
next: Page
- returns
a new Page which is the next logical page.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val numberOfResults: Int
-
def
offset: Int
- returns
the index of the first result on this page as a 0-indexed number. For example, offet for pages of size 20, will be 0, 20, 40, ...
- val pageNumber: Int
- val pageSize: Int
-
def
previous: Page
- returns
a new Page which is the previous logical page. If wrap is specified then previous will wrap to the last page if this is already the first page, otherwise it will return itself.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val totalResults: Int
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )