Package io.ably.lib.types
Interface AsyncPaginatedResult<T>
- Type Parameters:
T-
public interface AsyncPaginatedResult<T>
A type that represents a page of results from a paginated query.
The response is accompanied by metadata that indicates the relative
queries available.
-
Method Summary
Modifier and Type Method Description voidcurrent(Callback<AsyncPaginatedResult<T>> callback)Returns a new PaginatedResult for the current page of results.voidfirst(Callback<AsyncPaginatedResult<T>> callback)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.T[]items()Contains the current page of results; for example, an array ofMessageorPresenceMessageobjects for a channel history request.voidnext(Callback<AsyncPaginatedResult<T>> callback)Returns a new PaginatedResult loaded with the next page of results.
-
Method Details
-
items
T[] items()Contains the current page of results; for example, an array ofMessageorPresenceMessageobjects for a channel history request.Spec: TG3
-
first
Returns a new PaginatedResult for the first page of results.Spec: TG5
-
current
Returns a new PaginatedResult for the current page of results.Spec: TG5
-
next
Returns a new PaginatedResult loaded with the next page of results. If there are no further pages, then null is returned.Spec: TG4
-
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.
-