Package io.ably.lib.types
Interface PaginatedResult<T>
-
- Type Parameters:
T-
public interface PaginatedResult<T>Contains a page of results for message or presence history, stats, or REST presence requests. A PaginatedResult response from a REST API paginated query is also accompanied by metadata that indicates the relative queries available to the PaginatedResult object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PaginatedResult<T>current()Returns a new PaginatedResult for the current page of results.PaginatedResult<T>first()Returns a new PaginatedResult for the first page of results.booleanhasCurrent()booleanhasFirst()booleanhasNext()Returns true if there are more pages available by calling next and returns false if this page is the last page available.booleanisLast()Returns true if this page is the last page and returns false if there are more pages available by calling next available.T[]items()Contains the current page of results; for example, an array ofMessageorPresenceMessageobjects for a channel history request.PaginatedResult<T>next()Returns a new PaginatedResult loaded with the next page of results.
-
-
-
Method Detail
-
items
T[] items()
Contains the current page of results; for example, an array ofMessageorPresenceMessageobjects for a channel history request.Spec: TG3
-
first
PaginatedResult<T> first() throws AblyException
Returns a new PaginatedResult for the first page of results.Spec: TG5
- Throws:
AblyException
-
current
PaginatedResult<T> current() throws AblyException
Returns a new PaginatedResult for the current page of results.Spec: TG5
- Throws:
AblyException
-
next
PaginatedResult<T> next() throws AblyException
Returns a new PaginatedResult loaded with the next page of results. If there are no further pages, then null is returned.Spec: TG4
- Returns:
- A page of results for message and presence history, stats, and REST presence requests.
- Throws:
AblyException
-
hasFirst
boolean hasFirst()
-
hasCurrent
boolean hasCurrent()
-
hasNext
boolean hasNext()
Returns true if there are more pages available by calling next and returns false if this page is the last page available.Spec: TG6
- Returns:
- Whether or not there are more pages of results.
-
isLast
boolean isLast()
Returns true if this page is the last page and returns false if there are more pages available by calling next available.Spec: TG7
- Returns:
- Whether or not this is the last page of results.
-
-