@PublicApi public class DefaultConnection<T> extends java.lang.Object implements Connection<T>
Connection| Constructor and Description |
|---|
DefaultConnection(java.util.List<Edge<T>> edges,
PageInfo pageInfo)
A connection consists of a list of edges and page info
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Edge<T>> |
getEdges() |
PageInfo |
getPageInfo() |
java.lang.String |
toString() |
public DefaultConnection(java.util.List<Edge<T>> edges, PageInfo pageInfo)
edges - a non null list of edgespageInfo - a non null page infojava.lang.IllegalArgumentException - if edges or page info is null. use Collections.emptyList() for empty edges.public java.util.List<Edge<T>> getEdges()
getEdges in interface Connection<T>Edges that are really a node of data and its cursorpublic PageInfo getPageInfo()
getPageInfo in interface Connection<T>PageInfo pagination data about about that list of edgespublic java.lang.String toString()
toString in class java.lang.Object