Package com.exedio.cops
Class Pager
- java.lang.Object
-
- com.exedio.cops.Pager
-
public final class Pager extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Pager.Config
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParameters(Cop cop)
Pager
first()
int
getFrom()
int
getLimit()
int
getOffset()
int
getPage()
int
getTo()
int
getTotal()
int
getTotalPages()
boolean
hasAfterNewPages()
boolean
hasBeforeNewPages()
void
init(int page, int total)
<E> List<E>
init(List<E> all)
boolean
isFirst()
boolean
isLast()
boolean
isNeeded()
boolean
isNeutral()
boolean
isTotalEmpty()
Pager
last()
List<Pager>
newLimits()
List<Pager>
newPages()
Pager
next()
Pager
previous()
Pager
switchLimit(int newLimit)
-
-
-
Method Detail
-
addParameters
public void addParameters(Cop cop)
-
getOffset
public int getOffset()
-
getLimit
public int getLimit()
-
init
public void init(int page, int total)
-
init
public <E> List<E> init(List<E> all)
- Returns:
- a subList of
all
corresponding the the current page of the pager.
-
isFirst
public boolean isFirst()
-
isLast
public boolean isLast()
-
first
public Pager first()
-
last
public Pager last()
-
previous
public Pager previous()
-
next
public Pager next()
-
switchLimit
public Pager switchLimit(int newLimit)
-
hasBeforeNewPages
public boolean hasBeforeNewPages()
-
hasAfterNewPages
public boolean hasAfterNewPages()
-
getFrom
public int getFrom()
-
getTo
public int getTo()
-
getTotal
public int getTotal()
-
isTotalEmpty
public boolean isTotalEmpty()
-
getPage
public int getPage()
-
getTotalPages
public int getTotalPages()
-
isNeeded
public boolean isNeeded()
-
isNeutral
public boolean isNeutral()
-
-