Top Description Fields Constructors Methods
jakarta.data.page

pack-priv Class PageRequestCursor

extends Object
implements Cursor
Class Inheritance
All Implemented Interfaces
jakarta.data.page.PageRequest.Cursor
Imports
java.util.Arrays, .List

Built-in implementation of Cursor for cursor-based pagination.

Field Summary

Modifier and TypeField and Description
private final Object[]
key

Key values.

Constructor Summary

AccessConstructor and Description
pack-priv
PageRequestCursor(Object...
key values.
key
)

Constructs a cursor with the specified key values.

Method Summary

Modifier and TypeMethod and Description
public List<?>
elements()

Implements jakarta.data.page.PageRequest.Cursor.elements.

An unmodifiable list of values in the key.

public boolean
equals(Object
a cursor against which to compare.
o
)

Overrides java.lang.Object.equals.

Implements jakarta.data.page.PageRequest.Cursor.equals.

Returns whether or not the values that make up the key of this cursor are equal to those of the supplied cursor.

public Object
get(int
position (0 is first) of the key value to obtain.
index
)

Implements jakarta.data.page.PageRequest.Cursor.get.

Returns the key value at the specified position.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements jakarta.data.page.PageRequest.Cursor.hashCode.

Returns a hash code based on the key values.

public int
size()

Implements jakarta.data.page.PageRequest.Cursor.size.

Returns the number of values in the key.

public String
toString()

Overrides java.lang.Object.toString.

Implements jakarta.data.page.PageRequest.Cursor.toString.

String representation of the cursor, including the number of key values in the cursor but not the values themselves.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

keyback to summary
private final Object[] key

Key values.

Constructor Detail

PageRequestCursorback to summary
pack-priv PageRequestCursor(Object... key)

Constructs a cursor with the specified key values.

Parameters
key:Object[]

key values.

Exceptions
IllegalArgumentException:
if no key values are provided.

Method Detail

elementsback to summary
public List<?> elements()

Implements jakarta.data.page.PageRequest.Cursor.elements.

Doc from jakarta.data.page.PageRequest.Cursor.elements.

An unmodifiable list of values in the key.

Returns:List<?>

an unmodifiable list containing the ordered values

Annotations
@Override
equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Implements jakarta.data.page.PageRequest.Cursor.equals.

Doc from jakarta.data.page.PageRequest.Cursor.equals.

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.

Parameters
o:Object

a cursor against which to compare.

Returns:boolean

true or false.

Annotations
@Override
getback to summary
public Object get(int index)

Implements jakarta.data.page.PageRequest.Cursor.get.

Doc from jakarta.data.page.PageRequest.Cursor.get.

Returns the key value at the specified position.

Parameters
index:int

position (0 is first) of the key value to obtain.

Returns:Object

the key value at the specified position.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements jakarta.data.page.PageRequest.Cursor.hashCode.

Doc from jakarta.data.page.PageRequest.Cursor.hashCode.

Returns a hash code based on the key values.

Returns:int

a hash code based on the key values.

Annotations
@Override
sizeback to summary
public int size()

Implements jakarta.data.page.PageRequest.Cursor.size.

Doc from jakarta.data.page.PageRequest.Cursor.size.

Returns the number of values in the key.

Returns:int

the number of values in the key.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements jakarta.data.page.PageRequest.Cursor.toString.

Doc from jakarta.data.page.PageRequest.Cursor.toString.

String representation of the cursor, including the number of key values in the cursor but not the values themselves.

Returns:String

String representation of the cursor.

Annotations
@Override