@ConsumerType public final class GenericConnection<T> extends Object implements Connection<T>, PageInfo
GenericConnection.Builder class to build a Connection that outputs
the supplied data, optionally sliced based on a "start after" cursor
and a limit on the number of items output.| Modifier and Type | Class and Description |
|---|---|
static class |
GenericConnection.Builder<T> |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_LIMIT |
static int |
MAX_LIMIT
We might make this configurable but for now let's stay on the safe side
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull Iterable<Edge<T>> |
getEdges() |
@NotNull Cursor |
getEndCursor() |
@NotNull PageInfo |
getPageInfo() |
@NotNull Cursor |
getStartCursor() |
boolean |
isHasNextPage() |
boolean |
isHasPreviousPage() |
public static final int DEFAULT_LIMIT
public static final int MAX_LIMIT
@NotNull public @NotNull Iterable<Edge<T>> getEdges()
getEdges in interface Connection<T>@NotNull public @NotNull PageInfo getPageInfo()
getPageInfo in interface Connection<T>@NotNull public @NotNull Cursor getStartCursor()
getStartCursor in interface PageInfo@NotNull public @NotNull Cursor getEndCursor()
getEndCursor in interface PageInfopublic boolean isHasPreviousPage()
isHasPreviousPage in interface PageInfopublic boolean isHasNextPage()
isHasNextPage in interface PageInfoCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.