T
- the type of elements in this listPagedList<T>
, Serializable
, Cloneable
, Iterable<T>
, Collection<T>
, List<T>
, RandomAccess
public class PagedArrayList<T> extends ArrayList<T> implements PagedList<T>
modCount
Constructor | Description |
---|---|
PagedArrayList(KeysetPage keyset,
long totalSize,
int firstResult,
int maxResults) |
Constructs a new empty paged array list.
|
PagedArrayList(Collection<? extends T> collection,
KeysetPage keyset,
long totalSize,
int firstResult,
int maxResults) |
Constructs a new paged array list from the given collection.
|
Modifier and Type | Method | Description |
---|---|---|
int |
getFirstResult() |
Returns the position of the first result, numbered from 0.
|
KeysetPage |
getKeysetPage() |
Returns the key set page for this paged list which can be used for key set pagination.
|
int |
getMaxResults() |
Returns the maximum number of results.
|
int |
getPage() |
Returns the number of this page, numbered from 1.
|
int |
getSize() |
Returns the actual size of this page.
|
int |
getTotalPages() |
Returns the number of total pages.
|
long |
getTotalSize() |
Returns the total size of the list or
-1 if the count query was disabled via PaginatedCriteriaBuilder.withCountQuery(boolean) . |
containsAll, toString
equals, hashCode
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
parallelStream, removeIf, stream
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, of, of, of, of, of, of, of, of, of, of, of, of, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
public PagedArrayList(KeysetPage keyset, long totalSize, int firstResult, int maxResults)
keyset
- The keyset page for this pagetotalSize
- The total size of the resultfirstResult
- The first result index within the overall resultmaxResults
- The maximum result count for a pagepublic PagedArrayList(Collection<? extends T> collection, KeysetPage keyset, long totalSize, int firstResult, int maxResults)
collection
- The collection of elements for this pagekeyset
- The keyset page for this pagetotalSize
- The total size of the resultfirstResult
- The first result index within the overall resultmaxResults
- The maximum result count for a pagepublic int getSize()
PagedList
getSize
in interface PagedList<T>
List.size()
public long getTotalSize()
PagedList
-1
if the count query was disabled via PaginatedCriteriaBuilder.withCountQuery(boolean)
.getTotalSize
in interface PagedList<T>
-1
if the count query was disabledpublic int getPage()
PagedList
public int getTotalPages()
PagedList
getTotalPages
in interface PagedList<T>
public int getFirstResult()
PagedList
-1
;getFirstResult
in interface PagedList<T>
-1
if the queried entity id does not existpublic int getMaxResults()
PagedList
getMaxResults
in interface PagedList<T>
public KeysetPage getKeysetPage()
PagedList
getKeysetPage
in interface PagedList<T>
FullQueryBuilder.page(com.blazebit.persistence.KeysetPage, int, int)
Copyright © 2014–2018 Blazebit. All rights reserved.