public class ListablePage<T> extends AbstractPageSupport<T>
ListablePage class is a Spring Data Page implementation wrapping a List as the content
for this page.Iterator,
List,
Page,
AbstractPageSupport| Constructor and Description |
|---|
ListablePage(List<T> content)
Constructs an new instance of
ListablePage initialized with the given List used as the content
for this page. |
| Modifier and Type | Method and Description |
|---|---|
List<T> |
getContent() |
int |
getNumber() |
Sort |
getSort() |
long |
getTotalElements() |
int |
getTotalPages() |
boolean |
hasContent() |
boolean |
hasNext() |
boolean |
hasPrevious() |
Iterator<T> |
iterator() |
<S> Page<S> |
map(Function<? super T,? extends S> converter) |
static <T> ListablePage<T> |
newListablePage(List<T> content)
Factory method used to construct a new instance of
ListablePage initialized with the given List,
serving as the content for this page. |
static <T> ListablePage<T> |
newListablePage(T... content)
Factory method used to construct a new instance of
ListablePage initialized with the given array,
serving as the content for this page. |
getNumberOfElements, getSize, isFirst, isLast, nextPageable, previousPageableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNumberOfElements, getPageable, getSize, isFirst, isLast, nextOrLastPageable, nextPageable, previousOrFirstPageable, previousPageableand, and, and, and, filter, flatMap, get, isEmpty, of, of, of, stream, toList, toSet, toStreamable, toStreamableforEach, spliterator@SafeVarargs public static <T> ListablePage<T> newListablePage(@NonNull T... content)
ListablePage initialized with the given array,
serving as the content for this page.T - Class type of the elements in the array.content - array of elements serving as the content for this page.ListablePage initialized with the given array for content.Arrays.asList(Object[]),
ListablePage(List)public static <T> ListablePage<T> newListablePage(@Nullable List<T> content)
ListablePage initialized with the given List,
serving as the content for this page.T - Class type of the elements in the List.content - List of elements serving as the content for this page.ListablePage initialized with the given List for content.ListablePage(List)public boolean hasContent()
hasContent in interface Slice<T>hasContent in class AbstractSliceSupport<T>public boolean hasNext()
public boolean hasPrevious()
hasPrevious in interface Slice<T>hasPrevious in class AbstractSliceSupport<T>public List<T> getContent()
getContent in interface Slice<T>getContent in class AbstractSliceSupport<T>public int getNumber()
public Sort getSort()
public long getTotalElements()
getTotalElements in interface Page<T>getTotalElements in class AbstractPageSupport<T>public int getTotalPages()
getTotalPages in interface Page<T>getTotalPages in class AbstractPageSupport<T>Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.