Skip to content

Instantly share code, notes, and snippets.

@ornicar
Created November 22, 2011 22:27
Show Gist options
  • Save ornicar/1387240 to your computer and use it in GitHub Desktop.
Save ornicar/1387240 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