@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 |
|---|---|
boolean |
equals(java.lang.Object o) |
java.util.List<Edge<T>> |
getEdges() |
PageInfo |
getPageInfo() |
int |
hashCode() |
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 that list of edgespublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object