public class

PageImpl

extends Object
implements Page<T>
java.lang.Object
   ↳ com.atlassian.bitbucket.util.PageImpl<T>

Summary

Public Constructors
PageImpl(PageRequest pageRequest, int size, Iterable<T> values, boolean lastPage)
Creates a page from the provided values and explicitly sets getIsLastPage() and size.
PageImpl(PageRequest pageRequest, Iterable<T> values, boolean lastPage, int size, int nextPageStart)
Creates a page from the provided values and explicitly sets getIsLastPage() and size.
PageImpl(PageRequest pageRequest, Iterable<T> values, boolean lastPage)
Creates a page from the provided values and explicitly sets getIsLastPage().
Public Methods
boolean equals(Object o)
boolean getIsLastPage()
int getLimit()
PageRequest getNextPageRequest()
@Nonnull SortedMap<Integer, T> getOrdinalIndexedValues()
Get a map of the page values mapped by their ordinal values.
int getSize()
int getStart()
@Nonnull Iterable<T> getValues()
int hashCode()
@Nonnull <E> PageImpl<E> transform(Function<? super T, ? extends E> transformFunction)
Transforms the page from a page of Ts to a page of Es
Protected Methods
int getNextPageOffset()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.bitbucket.util.Page

Public Constructors

public PageImpl (PageRequest pageRequest, int size, Iterable<T> values, boolean lastPage)

Creates a page from the provided values and explicitly sets getIsLastPage() and size. The next PageRequest will be inferred from the start and limit of the provided PageRequest.

Parameters
pageRequest the page request used to create this page
size the size of the page - i.e. the number of elements in this page
values an iterable of the values
lastPage if this is the last page

public PageImpl (PageRequest pageRequest, Iterable<T> values, boolean lastPage, int size, int nextPageStart)

Creates a page from the provided values and explicitly sets getIsLastPage() and size. The next PageRequest will start from the specified nextPageStart, with the same limit as the provided PageRequest.

Parameters
pageRequest the page request used to create this page
values an iterable of the values
lastPage if this is the last page
size the size of the page - i.e. the number of elements in this page
nextPageStart index of the element that will be the first in the next page

public PageImpl (PageRequest pageRequest, Iterable<T> values, boolean lastPage)

Creates a page from the provided values and explicitly sets getIsLastPage().

Parameters
pageRequest the page request used to create this page
values an iterable of the values
lastPage if this is the last page

Public Methods

public boolean equals (Object o)

public boolean getIsLastPage ()

public int getLimit ()

public PageRequest getNextPageRequest ()

@Nonnull public SortedMap<Integer, T> getOrdinalIndexedValues ()

Get a map of the page values mapped by their ordinal values. For filtered pages, the ordinals are the ordinals in the underlying paged collection.

Returns
  • The values mapped by their ordinal value in the page.

public int getSize ()

public int getStart ()

@Nonnull public Iterable<T> getValues ()

public int hashCode ()

@Nonnull public PageImpl<E> transform (Function<? super T, ? extends E> transformFunction)

Transforms the page from a page of Ts to a page of Es

Parameters
transformFunction the transformer
Returns
  • the new page of E

Protected Methods

protected int getNextPageOffset ()