Class/Object

com.sksamuel.exts.pagination

Page

Related Docs: object Page | package pagination

Permalink

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

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Page
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Page(pageNumber: Int, pageSize: Int, totalResults: Int, numberOfResults: Int)

    Permalink

    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

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def end: Int

    Permalink

    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, ...

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def first: Int

    Permalink

    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, ...

  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. def last: Int

    Permalink

    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, ....

  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def next: Page

    Permalink

    returns

    a new Page which is the next logical page.

  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. val numberOfResults: Int

    Permalink

    the number of results in this page, which is always <= pageSize

  18. def offset: Int

    Permalink

    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, ...

  19. val pageNumber: Int

    Permalink

    the page number represented by this page.

    the page number represented by this page. 1 indexed.

  20. val pageSize: Int

    Permalink

    the max number of results per page.

  21. def previous: Page

    Permalink

    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.

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. val totalResults: Int

    Permalink

    the total number of results in the underlying collection

  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped