Package org.graylog2.database
Class PaginatedList<E>
java.lang.Object
com.google.common.collect.ForwardingObject
com.google.common.collect.ForwardingCollection<E>
com.google.common.collect.ForwardingList<E>
org.graylog2.database.PaginatedList<E>
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,List<E>
public class PaginatedList<E>
extends com.google.common.collect.ForwardingList<E>
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionPaginatedList
(List<E> delegate, int total, int page, int perPage) Creates a PaginatedListPaginatedList
(List<E> delegate, int total, int page, int perPage, Long grandTotal) Creates a PaginatedList -
Method Summary
Modifier and TypeMethodDescriptiondelegate()
static <T> PaginatedList<T>
emptyList
(int page, int perPage) boolean
int
hashCode()
static <T> PaginatedList<T>
singleton
(T entry, int page, int perPage) toString()
Methods inherited from class com.google.common.collect.ForwardingList
add, addAll, get, indexOf, lastIndexOf, listIterator, listIterator, remove, set, standardAdd, standardAddAll, standardEquals, standardHashCode, standardIndexOf, standardIterator, standardLastIndexOf, standardListIterator, standardListIterator, standardSubList, subList
Methods inherited from class com.google.common.collect.ForwardingCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContains, standardContainsAll, standardIsEmpty, standardRemove, standardRemoveAll, standardRetainAll, standardToArray, standardToArray, standardToString, toArray, toArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
PaginatedList
Creates a PaginatedList- Parameters:
delegate
- the actual entriestotal
- the count of all entries (ignoring pagination)page
- the page this PaginatedList representsperPage
- the size limit for each page
-
PaginatedList
Creates a PaginatedList- Parameters:
delegate
- the actual entriestotal
- the count of all entries (ignoring pagination)page
- the page this PaginatedList representsperPage
- the size limit for each pagegrandTotal
- the count of all entries (ignoring query filters and pagination)
-
-
Method Details
-
delegate
- Specified by:
delegate
in classcom.google.common.collect.ForwardingList<E>
-
pagination
-
grandTotal
-
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toString
in classcom.google.common.collect.ForwardingObject
-
emptyList
-
singleton
-