public final class Paginator extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
getPage(Request request)
Gets the current page number from the query string "p" of the specified request.
|
static int |
getPage(RequestContext context)
Gets the current page number from the query string "p" of the specified context.
|
static List<Integer> |
paginate(int currentPageNum,
int pageSize,
int pageCount,
int windowSize)
Paginates with the specified current page number, page size, page count and window size.
|
public static int getPage(RequestContext context)
context - the specified context1 as defaultpublic static int getPage(Request request)
request - the specified request1 as defaultpublic static List<Integer> paginate(int currentPageNum, int pageSize, int pageCount, int windowSize)
currentPageNum - the specified current page numberpageSize - the specified page sizepageCount - the specified page countwindowSize - the specified window sizeCopyright © 2009–2019 B3log. All rights reserved.