public class PaginatedResult<E> extends Object
Constructor and Description |
---|
PaginatedResult(long offset,
int limit,
List<E> allItems)
Creates a view of the given
allItems within the given
offset and limit . |
PaginatedResult(long offset,
int limit,
long count,
List<E> items) |
Modifier and Type | Method and Description |
---|---|
static <T> PaginatedResult<T> |
empty()
Returns an empty instance.
|
long |
getCount() |
long |
getFirstItemIndex() |
long |
getFirstOffset() |
boolean |
getHasItems()
Deprecated.
Use
getHasPages() instead. |
boolean |
getHasNext() |
boolean |
getHasPages() |
boolean |
getHasPrevious() |
List<E> |
getItems() |
long |
getLastItemIndex() |
long |
getLastOffset() |
int |
getLimit() |
long |
getNextOffset() |
long |
getOffset() |
long |
getPageCount() |
long |
getPageIndex() |
long |
getPreviousOffset() |
boolean |
hasItems()
Deprecated.
Use
!instance.getItems().isEmpty() instead}. |
boolean |
hasNext() |
boolean |
hasPages() |
boolean |
hasPrevious() |
public static <T> PaginatedResult<T> empty()
public long getOffset()
public int getLimit()
public long getCount()
public long getFirstOffset()
public boolean hasPrevious()
public long getPreviousOffset()
public boolean hasNext()
public long getNextOffset()
public long getLastOffset()
public long getFirstItemIndex()
@Deprecated public boolean hasItems()
!instance.getItems().isEmpty()
instead}.hasPages()
public long getLastItemIndex()
public long getPageIndex()
public long getPageCount()
public boolean hasPages()
public boolean getHasPrevious()
hasPrevious()
public boolean getHasNext()
hasNext()
@Deprecated public boolean getHasItems()
getHasPages()
instead.public boolean getHasPages()
hasPages()
Copyright © 2018. All rights reserved.