casualjim
11/22/2011 - 10:29 PM

Paginator.scala

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")