public interface Slice<T> extends Streamable<T>
Pageable
to request a previous or next Slice
.Modifier and Type | Method and Description |
---|---|
List<T> |
getContent()
Returns the page content as
List . |
int |
getNumber()
Returns the number of the current
Slice . |
int |
getNumberOfElements()
Returns the number of elements currently on this
Slice . |
default Pageable |
getPageable()
|
int |
getSize()
Returns the size of the
Slice . |
Sort |
getSort()
Returns the sorting parameters for the
Slice . |
boolean |
hasContent()
Returns whether the
Slice has content at all. |
boolean |
hasNext()
Returns if there is a next
Slice . |
boolean |
hasPrevious()
Returns if there is a previous
Slice . |
boolean |
isFirst()
Returns whether the current
Slice is the first one. |
boolean |
isLast()
Returns whether the current
Slice is the last one. |
<U> Slice<U> |
map(Function<? super T,? extends U> converter)
|
default Pageable |
nextOrLastPageable()
Returns the
Pageable describing the next slice or the one describing the current slice in case it's the
last one. |
Pageable |
nextPageable()
|
default Pageable |
previousOrFirstPageable()
Returns the
Pageable describing the previous slice or the one describing the current slice in case it's the
first one. |
Pageable |
previousPageable()
|
and, and, and, and, empty, filter, flatMap, get, isEmpty, of, of, of, stream, toList, toSet, toStreamable, toStreamable
forEach, iterator, spliterator
int getNumber()
Slice
. Is always non-negative.Slice
.int getNumberOfElements()
Slice
.Slice
.boolean hasContent()
Slice
has content at all.boolean isFirst()
Slice
is the first one.boolean isLast()
Slice
is the last one.boolean hasPrevious()
Slice
.Slice
.default Pageable getPageable()
Pageable nextPageable()
Pageable
to request the next Slice
. Can be Pageable.unpaged()
in case the
current Slice
is already the last one. Clients should check hasNext()
before calling this method.nextOrLastPageable()
Pageable previousPageable()
Pageable
to request the previous Slice
. Can be Pageable.unpaged()
in case the
current Slice
is already the first one. Clients should check hasPrevious()
before calling this
method.previousPageable()
<U> Slice<U> map(Function<? super T,? extends U> converter)
map
in interface Streamable<T>
converter
- must not be null.Slice
with the content of the current one mapped by the given Converter
.Stream.map(Function)
default Pageable nextOrLastPageable()
Pageable
describing the next slice or the one describing the current slice in case it's the
last one.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.