Constructor and Description |
---|
FilteredPageImpl(PageRequest pageRequest,
int size,
SortedMap<Integer,T> valueMap,
boolean lastPage) |
Modifier and Type | Method and Description |
---|---|
void |
forEach(Consumer<? super T> action)
Performs an action on each result in the page.
|
boolean |
getIsLastPage() |
int |
getLimit() |
PageRequest |
getNextPageRequest() |
SortedMap<Integer,T> |
getOrdinalIndexedValues()
Get a map of the page values mapped by their ordinal values.
|
int |
getSize() |
int |
getStart() |
Iterable<T> |
getValues() |
Stream<T> |
stream() |
<E> FilteredPageImpl<E> |
transform(Function<? super T,? extends E> transformFunction)
Transforms the results on the page, producing a new
Page with different values but
all other properties (e.g. |
public void forEach(@Nonnull Consumer<? super T> action)
Page
public boolean getIsLastPage()
getIsLastPage
in interface Page<T>
true
if there are no more results; otherwise, false
if at least one more page,
perhaps partially filled but not empty, of results is availablepublic int getLimit()
getLimit
in interface Page<T>
PageRequest
that generated this pagepublic PageRequest getNextPageRequest()
getNextPageRequest
in interface Page<T>
null
if this was
the last page
@Nonnull public SortedMap<Integer,T> getOrdinalIndexedValues()
Page
getOrdinalIndexedValues
in interface Page<T>
public int getSize()
public int getStart()
@Nonnull public <E> FilteredPageImpl<E> transform(@Nonnull Function<? super T,? extends E> transformFunction)
Page
Page
with different values
but
all other properties (e.g. start
and limit
) unchanged.
Implementation note: Transformation is done eagerly to ensure the resulting Page
does
not retain a reference to the original results from the source page. If a transform is used purely to apply
some set of side effects, consider using Page.forEach(java.util.function.Consumer<? super T>)
instead.
Copyright © 2019 Atlassian. All rights reserved.