com.sksamuel.pagination

Page

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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. 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, ...

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

    Definition Classes
    AnyRef
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. 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, ...

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

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

    Definition Classes
    Any
  14. 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, ....

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

    Definition Classes
    AnyRef
  16. def next: Page

    returns

    a new Page which is the next logical page.

  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. val numberOfResults: Int

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

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

  21. val pageNumber: Int

    the page number represented by this page.

    the page number represented by this page. 1 indexed.

  22. val pageSize: Int

    the max number of results per page.

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

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

    Definition Classes
    AnyRef
  25. val totalResults: Int

    the total number of results in the underlying collection

  26. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped