public class SimplePullRequestActivityPage<T extends PullRequestActivity> extends Object implements PullRequestActivityPage<T>
NO_ID| Constructor and Description |
|---|
SimplePullRequestActivityPage(Page<T> page,
long previousPageStartId) |
| Modifier and Type | Method and Description |
|---|---|
void |
forEach(Consumer<? super T> action)
Performs an action on each result in the page.
|
boolean |
getIsFirstPage() |
boolean |
getIsLastPage() |
int |
getLimit() |
PageRequest |
getNextPageRequest() |
SortedMap<Integer,T> |
getOrdinalIndexedValues()
Get a map of the page values mapped by their ordinal values.
|
long |
getPreviousPageStartId() |
int |
getSize() |
int |
getStart() |
Iterable<T> |
getValues() |
Stream<T> |
stream() |
<E> Page<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)
PageforEach in interface Page<T extends PullRequestActivity>action - the action to apply to each resultpublic boolean getIsFirstPage()
getIsFirstPage in interface PullRequestActivityPage<T extends PullRequestActivity>public boolean getIsLastPage()
getIsLastPage in interface Page<T extends PullRequestActivity>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 extends PullRequestActivity>PageRequest that generated this pagepublic PageRequest getNextPageRequest()
getNextPageRequest in interface Page<T extends PullRequestActivity>null if this was
the last page@Nonnull public SortedMap<Integer,T> getOrdinalIndexedValues()
PagegetOrdinalIndexedValues in interface Page<T extends PullRequestActivity>public long getPreviousPageStartId()
getPreviousPageStartId in interface PullRequestActivityPage<T extends PullRequestActivity>PullRequestActivityPage.NO_ID if this is the first pagepublic int getSize()
getSize in interface Page<T extends PullRequestActivity>public int getStart()
getStart in interface Page<T extends PullRequestActivity>@Nonnull public Iterable<T> getValues()
getValues in interface Page<T extends PullRequestActivity>@Nonnull public Stream<T> stream()
stream in interface Page<T extends PullRequestActivity>Stream over the page's results@Nonnull public <E> Page<E> transform(@Nonnull Function<? super T,? extends E> transformFunction)
PagePage 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.
transform in interface Page<T extends PullRequestActivity>E - the target typetransformFunction - the transformerCopyright © 2019 Atlassian. All rights reserved.