Interface PageableResponse<T>
- Type Parameters:
T- The parsed Response object type.
- All Known Implementing Classes:
ListBuildsResponse,ListOrganizationsResponse,ListPipelinesResponse
public interface PageableResponse<T>
Interface indicates that a Response from the Buildkite REST Api is Pageable, and can be passed into
the following methods to retrieve various pages.
BuildkiteClient.nextPage(PageableResponse) nextPage()}
BuildkiteClient.previousPage(PageableResponse) previousPage()}
BuildkiteClient.firstPage(PageableResponse) firstPage()}
BuildkiteClient.lastPage(PageableResponse) lastPage()}-
Method Summary
Modifier and TypeMethodDescriptionGet the original underlyingRequestused to generate this response.Contains references to First, Next, Previous, and Last pages of a Response.default booleanUtility method to determine if there is a first page available.default booleanUtility method to determine if there is a last page available.default booleanUtility method to determine if there are additional pages available.default booleanUtility method to determine if there are previous pages available.
-
Method Details
-
getPagingLinks
PagingLinks getPagingLinks()Contains references to First, Next, Previous, and Last pages of a Response.- Returns:
- Contains references to First, Next, Previous, and Last pages of a Response.
-
hasNextPage
default boolean hasNextPage()Utility method to determine if there are additional pages available.- Returns:
- true if there is a next page that can be retrieved, false if not.
-
hasPreviousPage
default boolean hasPreviousPage()Utility method to determine if there are previous pages available.- Returns:
- true if there is a previous page that can be retrieved, false if not.
-
hasFirstPage
default boolean hasFirstPage()Utility method to determine if there is a first page available.- Returns:
- true if there is a first page that can be retrieved, false if not.
-
hasLastPage
default boolean hasLastPage()Utility method to determine if there is a last page available.- Returns:
- true if there is a last page that can be retrieved, false if not.
-
getOriginalRequest
PageableRequest<T> getOriginalRequest()Get the original underlyingRequestused to generate this response.- Returns:
- Original underlying Request.
-