Class Page<T>

java.lang.Object
org.stellar.sdk.responses.Response
org.stellar.sdk.responses.Page<T>
All Implemented Interfaces:
TypedResponse<Page<T>>

public class Page<T> extends Response implements TypedResponse<Page<T>>
Represents page of objects.
See Also:
  • Method Details

    • getNextPage

      public Page<T> getNextPage(okhttp3.OkHttpClient httpClient)
      Returns:
      The next page of results or null when there is no link for the next page of results
      Throws:
      NetworkException - All the exceptions below are subclasses of NetworkError
      BadRequestException - if the request fails due to a bad request (4xx)
      BadResponseException - if the request fails due to a bad response from the server (5xx)
      TooManyRequestsException - if the request fails due to too many requests sent to the server
      RequestTimeoutException - When Horizon returns a Timeout or connection timeout occurred
      UnknownResponseException - if the server returns an unknown status code
      ConnectionErrorException - When the request cannot be executed due to cancellation or connectivity problems, etc.
    • setType

      public void setType(com.google.gson.reflect.TypeToken<Page<T>> type)
      Specified by:
      setType in interface TypedResponse<T>
    • getRecords

      public List<T> getRecords()
    • getLinks

      public Page.Links getLinks()
    • getType

      public com.google.gson.reflect.TypeToken<Page<T>> getType()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object