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() |
org.springframework.data.domain.Sort |
getSort() |
long |
getTotalElements() |
int |
getTotalPages() |
boolean |
hasContent() |
boolean |
hasNext() |
boolean |
hasPrevious() |
Iterator<T> |
iterator() |
<S> org.springframework.data.domain.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, previousPageable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNumberOfElements, getPageable, getSize, isFirst, isLast, nextOrLastPageable, nextPageable, previousOrFirstPageable, previousPageable
and, and, and, and, filter, flatMap, get, isEmpty, of, of, of, stream, toList, toSet, toStreamable, toStreamable
forEach, 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 org.springframework.data.domain.Slice<T>
hasContent
in class AbstractSliceSupport<T>
public boolean hasNext()
hasNext
in interface org.springframework.data.domain.Slice<T>
hasNext
in class AbstractSliceSupport<T>
public boolean hasPrevious()
hasPrevious
in interface org.springframework.data.domain.Slice<T>
hasPrevious
in class AbstractSliceSupport<T>
public List<T> getContent()
getContent
in interface org.springframework.data.domain.Slice<T>
getContent
in class AbstractSliceSupport<T>
public int getNumber()
getNumber
in interface org.springframework.data.domain.Slice<T>
getNumber
in class AbstractSliceSupport<T>
public org.springframework.data.domain.Sort getSort()
getSort
in interface org.springframework.data.domain.Slice<T>
getSort
in class AbstractSliceSupport<T>
public long getTotalElements()
getTotalElements
in interface org.springframework.data.domain.Page<T>
getTotalElements
in class AbstractPageSupport<T>
public int getTotalPages()
getTotalPages
in interface org.springframework.data.domain.Page<T>
getTotalPages
in class AbstractPageSupport<T>
Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.