Offset Cursor
A cursor for offset-based pagination.
OffsetCursor wraps an encoded cursor string that represents a position in a paginated list. The cursor format is: Base64("__viaduct:idx:<offset>").
Java equivalent of Kotlin's viaduct.api.types.OffsetCursor. The encode/decode logic lives in the language-neutral OffsetCursorCodec, shared with the Kotlin Tenant API, so cursors produced by either language are byte-for-byte interchangeable.
- getValue holds the encoded cursor string (e.g.
"X192aWFkdWN0OmlkeDow") - toOffsetdecodes the cursor string to get the offset
- fromOffsetcreates an OffsetCursor by encoding the offset