Class CursorPaginatedResponse<T>

java.lang.Object
com.helixframework.api.contract.CursorPaginatedResponse<T>
Type Parameters:
T - item type

public class CursorPaginatedResponse<T> extends Object
API response that returns a collection with cursor pagination.
  • Constructor Details

    • CursorPaginatedResponse

      public CursorPaginatedResponse()
      Creates an instance of CursorPaginatedResponse.
    • CursorPaginatedResponse

      public CursorPaginatedResponse(Collection<T> items)
      Creates an instance of CursorPaginatedResponse without a next page.
      Parameters:
      items - items to return in response
    • CursorPaginatedResponse

      public CursorPaginatedResponse(String cursor, Collection<T> items)
      Creates an instance of CursorPaginatedResponse that has a next page.
      Parameters:
      cursor - next page cursor
      items - items to return in response
  • Method Details

    • getCount

      public int getCount()
      Gets the number of items in the collection.
      Returns:
      number of items in the collection
    • getCursor

      public String getCursor()
      Gets the next page cursor.
      Returns:
      next page cursor
    • getItems

      public List<T> getItems()
      Gets the items.
      Returns:
      items