Class PagingLinks

java.lang.Object
org.sourcelab.buildkite.api.client.response.PagingLinks

public class PagingLinks extends Object
Represents the 'Link' header for paging results.
  • Constructor Details

  • Method Details

    • newBuilder

      public static PagingLinksBuilder 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

      public String getPrevUrl()
      Get the Previous Url.
      Returns:
      Previous Url.
      Throws:
      IllegalStateException - If no previous url is defined.
    • getNextUrl

      public String getNextUrl()
      Get the Next Url.
      Returns:
      Next Url.
      Throws:
      IllegalStateException - If no next url is defined.
    • getFirstUrl

      public String getFirstUrl()
      Get the First Url.
      Returns:
      First Url.
      Throws:
      IllegalStateException - If no first url is defined.
    • getLastUrl

      public String 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

      public String toString()
      Overrides:
      toString in class Object