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 boolean
equals(Object obj)
static @Nullable Cursor
fromEncodedString(@Nullable String encoded)
Generates a new cursor based on anencoded
value obtained via the same encoding mechanismthis
class uses.@NotNull String
getEncoded()
@NotNull String
getRawValue()
int
hashCode()
String
toString()
-
-
-
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 anencoded
value obtained via the same encoding mechanismthis
class uses.- Parameters:
encoded
- the encoded value from which to generate a new cursor- Returns:
- a new cursor, if one can be generated;
null
otherwise
-
getRawValue
@NotNull public @NotNull String getRawValue()
-
getEncoded
@NotNull public @NotNull String getEncoded()
-
-