Interface PageRequest.Cursor

Enclosing interface:
PageRequest

public static interface PageRequest.Cursor
A cursor that is formed from a key, relative to which a next or previous page can be requested.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<?>
    An unmodifiable list of values in the key.
    boolean
    equals(Object cursor)
    Returns whether or not the values that make up the key of this cursor are equal to those of the supplied cursor.
    forKey(Object... key)
    Obtain an instance of Cursor for the given key.
    get(int index)
    Returns the key value at the specified position.
    int
    Returns a hash code based on the key values.
    int
    Returns the number of values in the key.
    String representation of the cursor, including the number of key values in the cursor but not the values themselves.
  • Method Details

    • equals

      boolean equals(Object cursor)
      Returns whether or not the values that make up the key of this cursor are equal to those of the supplied cursor. Both instances must also have the same cursor implementation class in order to be considered equal.
      Overrides:
      equals in class Object
      Parameters:
      cursor - a cursor against which to compare.
      Returns:
      true or false.
    • get

      Object get(int index)
      Returns the key value at the specified position.
      Parameters:
      index - position (0 is first) of the key value to obtain.
      Returns:
      the key value at the specified position.
      Throws:
      IndexOutOfBoundsException - if the index is negative or greater than or equal to the size().
    • hashCode

      int hashCode()
      Returns a hash code based on the key values.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code based on the key values.
    • size

      int size()
      Returns the number of values in the key.
      Returns:
      the number of values in the key.
    • elements

      List<?> elements()
      An unmodifiable list of values in the key.
      Returns:
      an unmodifiable list containing the ordered values
    • toString

      String toString()
      String representation of the cursor, including the number of key values in the cursor but not the values themselves.
      Overrides:
      toString in class Object
      Returns:
      String representation of the cursor.
    • forKey

      static PageRequest.Cursor forKey(Object... key)
      Obtain an instance of Cursor for the given key.
      Parameters:
      key - the key
      Returns:
      a new instance of Cursor