Class PagingLinks
java.lang.Object
org.sourcelab.buildkite.api.client.response.PagingLinks
Represents the 'Link' header for paging results.
-
Constructor Summary
ConstructorsConstructorDescriptionPagingLinks(String prevUrl, String nextUrl, String firstUrl, String lastUrl) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the First Url.Get the Last Url.Get the Next Url.Get the Previous Url.longIf the Last Page URL is populated, calculate the total number of entries.booleanbooleanbooleanbooleanstatic PagingLinksBuilderCreate new Builder instance for PagingLinks.toString()
-
Constructor Details
-
PagingLinks
Constructor.
-
-
Method Details
-
newBuilder
Create new Builder instance for PagingLinks.- Returns:
- New Builder instance for PagingLinks.
-
hasFirstUrl
public boolean hasFirstUrl() -
hasLastUrl
public boolean hasLastUrl() -
hasNextUrl
public boolean hasNextUrl() -
hasPrevUrl
public boolean hasPrevUrl() -
getPrevUrl
Get the Previous Url.- Returns:
- Previous Url.
- Throws:
IllegalStateException- If no previous url is defined.
-
getNextUrl
Get the Next Url.- Returns:
- Next Url.
- Throws:
IllegalStateException- If no next url is defined.
-
getFirstUrl
Get the First Url.- Returns:
- First Url.
- Throws:
IllegalStateException- If no first url is defined.
-
getLastUrl
Get the Last Url.- Returns:
- Last Url.
- Throws:
IllegalStateException- If no last url is defined.
-
getTotalNumberOfEntries
public long getTotalNumberOfEntries()If the Last Page URL is populated, calculate the total number of entries.- Returns:
- If the Last Page URL is populated, calculate the total number of entries.
- Throws:
IllegalStateException- If the Last Url is not defined.
-
toString
-