Class ToolsPager


  • public class ToolsPager
    extends java.lang.Object
    ToolsPager can be used to simplify the use of the "listTools" method.
    • Constructor Summary

      Constructors 
      Constructor Description
      ToolsPager​(CdToolchain client, ListToolsOptions options)
      Constructs a new ToolsPager instance with the specified client and options model instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<ToolModel> getAll()
      Returns all results by invoking getNext() repeatedly until all pages of results have been retrieved.
      java.util.List<ToolModel> getNext()
      Returns the next page of results.
      boolean hasNext()
      Returns true if there are more results to be retrieved.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ToolsPager

        public ToolsPager​(CdToolchain client,
                          ListToolsOptions options)
        Constructs a new ToolsPager instance with the specified client and options model instance.
        Parameters:
        client - the CdToolchain instance to be used to invoke the "listTools" method
        options - the ListToolsOptions instance to be used to invoke the "listTools" method
    • Method Detail

      • hasNext

        public boolean hasNext()
        Returns true if there are more results to be retrieved.
        Returns:
        boolean
      • getNext

        public java.util.List<ToolModel> getNext()
        Returns the next page of results.
        Returns:
        a List<ToolModel> that contains the next page of results
      • getAll

        public java.util.List<ToolModel> getAll()
        Returns all results by invoking getNext() repeatedly until all pages of results have been retrieved.
        Returns:
        a List<ToolModel> containing all results returned by the "listTools" method