public abstract class

AbstractPagedSummary

extends AbstractSummary
java.lang.Object
   ↳ com.atlassian.stash.util.AbstractSummary
     ↳ com.atlassian.stash.util.AbstractPagedSummary
Known Direct Subclasses

Class Overview

Extends AbstractSummary and adds additional properties for summarizing a page of output.

Summary

Nested Classes
class AbstractPagedSummary.AbstractPagedBuilder<B extends AbstractPagedBuilder<B, S extends AbstractPagedSummary>, S>  
Protected Constructors
AbstractPagedSummary(AbstractPagedBuilder<?, ?> builder)
Public Methods
@Deprecated @Nonnull Page<Void> asPage()
This method is deprecated. in 2.12. Scheduled for removal in 4.0.
@Nullable PageRequest getNextPageRequest()
If this is not the last page, retrieves the PageRequest which can be used to request the next page.
@Nonnull PageRequest getPageRequest()
Retrieves the PageRequest that was used to retrieve this page of results.
int getSize()
Retrieves the number of results that were retrieved.
boolean isLastPage()
Retrieves a flag indicating whether this page is the last page of results.
[Expand]
Inherited Methods
From class com.atlassian.stash.util.AbstractSummary
From class java.lang.Object

Protected Constructors

protected AbstractPagedSummary (AbstractPagedBuilder<?, ?> builder)

Public Methods

@Deprecated @Nonnull public Page<Void> asPage ()

This method is deprecated.
in 2.12. Scheduled for removal in 4.0.

Transforms this summary into a Page expressing the same values. The values collection on the returned Page will be empty (but not null)).

Returns
  • this summary expressed as a Page

@Nullable public PageRequest getNextPageRequest ()

If this is not the last page, retrieves the PageRequest which can be used to request the next page. If this is the last page, returns null.

Returns

@Nonnull public PageRequest getPageRequest ()

Retrieves the PageRequest that was used to retrieve this page of results.

Returns

public int getSize ()

Retrieves the number of results that were retrieved. This value will always be less than or equal to the limit of the current page request.

Returns
  • the size of the current page

public boolean isLastPage ()

Retrieves a flag indicating whether this page is the last page of results.

Returns
  • true if this is the final page of results; otherwise, false if there is a next page