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
Modifier and TypeMethodDescriptioncurrent()
Returns a new PaginatedResult for the current page of results.first()
Returns a new PaginatedResult for the first page of results.boolean
boolean
hasFirst()
boolean
hasNext()
Returns true if there are more pages available by calling next and returns false if this page is the last page available.boolean
isLast()
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 ofMessage
orPresenceMessage
objects for a channel history request.next()
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 ofMessage
orPresenceMessage
objects for a channel history request.Spec: TG3
-
first
Returns a new PaginatedResult for the first page of results.Spec: TG5
- Throws:
AblyException
-
current
Returns a new PaginatedResult for the current page of results.Spec: TG5
- Throws:
AblyException
-
next
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.
-