Class BidiCursorPaginatedResponse<T>

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

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

    • BidiCursorPaginatedResponse

      public BidiCursorPaginatedResponse()
      Creates a new instance of BidiCursorPaginatedResponse.
    • BidiCursorPaginatedResponse

      public BidiCursorPaginatedResponse(String nextCursor, String previousCursor, Collection<T> items)
      Creates a new instance of BidiCursorPaginatedResponse.
      Parameters:
      nextCursor - next page cursor
      previousCursor - previous page cursor
      items - items
    • BidiCursorPaginatedResponse

      public BidiCursorPaginatedResponse(String nextCursor, String previousCursor, Boolean hasNext, Boolean hasPrevious, Collection<T> items)
      Creates a new instance of BidiCursorPaginatedResponse.
      Parameters:
      nextCursor - next page cursor
      previousCursor - previous page cursor
      hasNext - flag indicating whether items exist after the current cursor
      hasPrevious - flag indicating whether items exist before the current cursor
      items - items
  • Method Details

    • getCount

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

      public String getNextCursor()
      Gets the next page cursor.
      Returns:
      next page cursor
    • getPreviousCursor

      public String getPreviousCursor()
      Gets the previous page cursor.
      Returns:
      previous page cursor
    • hasNext

      public Boolean hasNext()
      Optional flag indicating whether there are more items after the current cursor.
      Returns:
      true if there are items after the current cursor; otherwise false
    • hasPrevious

      public Boolean hasPrevious()
      Optional flag indicating whether there are more items before the current cursor.
      Returns:
      true if there are items before the current cursor; otherwise false
    • getItems

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