Class Cursor
- java.lang.Object
-
- org.apache.sling.graphql.api.pagination.Cursor
-
@ProviderType public class Cursor extends Object
This class provides a Base64-encoded cursor which is used for paginated results, according to the specification from https://relay.dev/graphql/connections.htm#sec-Cursor.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static @Nullable CursorfromEncodedString(@Nullable String encoded)Generates a new cursor based on anencodedvalue obtained via the same encoding mechanismthisclass uses.@NotNull StringgetEncoded()@NotNull StringgetRawValue()inthashCode()StringtoString()
-
-
-
Constructor Detail
-
Cursor
public Cursor(@NotNull @NotNull String rawValue)- Parameters:
rawValue- the raw value from which to generate a cursor
-
-
Method Detail
-
fromEncodedString
@Nullable public static @Nullable Cursor fromEncodedString(@Nullable @Nullable String encoded)
Generates a new cursor based on anencodedvalue obtained via the same encoding mechanismthisclass uses.- Parameters:
encoded- the encoded value from which to generate a new cursor- Returns:
- a new cursor, if one can be generated;
nullotherwise
-
getRawValue
@NotNull public @NotNull String getRawValue()
-
getEncoded
@NotNull public @NotNull String getEncoded()
-
-