Package org.sonar.api.utils
Class Paging
- java.lang.Object
-
- org.sonar.api.utils.Paging
-
public class Paging extends java.lang.Object
- Since:
- 3.6
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Paging.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Paging
create(int pageSize, int pageIndex, int totalItems)
Deprecated.since 5.2 please use the #forPgeIndex(...) builder methodstatic Paging.Builder
forPageIndex(int pageIndex)
boolean
hasNextPage()
int
offset()
static int
offset(int pageIndex, int pageSize)
int
pageIndex()
Page index, starting with 1.int
pages()
Number of pages.int
pageSize()
Maximum number of items per page.int
total()
Total number of items.
-
-
-
Method Detail
-
create
@Deprecated public static Paging create(int pageSize, int pageIndex, int totalItems)
Deprecated.since 5.2 please use the #forPgeIndex(...) builder method
-
forPageIndex
public static Paging.Builder forPageIndex(int pageIndex)
-
pageIndex
public int pageIndex()
Page index, starting with 1.
-
pageSize
public int pageSize()
Maximum number of items per page. It is greater than 0.
-
total
public int total()
Total number of items. It is greater than or equal 0.
-
offset
public int offset()
-
offset
public static int offset(int pageIndex, int pageSize)
-
pages
public int pages()
Number of pages. It is greater than or equal 0.
-
hasNextPage
public boolean hasNextPage()
- Since:
- 4.1
-
-