Skip to content

Instantly share code, notes, and snippets.

@casualjim
Forked from ornicar/Paginator.scala
Created November 22, 2011 22:29
Show Gist options
  • Save casualjim/1387245 to your computer and use it in GitHub Desktop.
Save casualjim/1387245 to your computer and use it in GitHub Desktop.
case class Paginator[A](
val adapter: Adapter[A],
val currentPage: Int = 1,
val maxPerPage: Int = 10
) extends PaginatorLike[A] {
assert(maxPerPage > 0, "Max per page must be greater than zero")
assert(currentPage > 0, "Current page must be greater than zero")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment