Package graphql.relay
Class DefaultConnection<T>
java.lang.Object
graphql.relay.DefaultConnection<T>
- All Implemented Interfaces:
Connection<T>
A default implementation of
Connection
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultConnection
(List<Edge<T>> edges, PageInfo pageInfo) A connection consists of a list of edges and page info -
Method Summary
-
Constructor Details
-
DefaultConnection
A connection consists of a list of edges and page info- Parameters:
edges
- a non null list of edgespageInfo
- a non null page info- Throws:
IllegalArgumentException
- if edges or page info is null. useCollections.emptyList()
for empty edges.
-
-
Method Details
-
getEdges
- Specified by:
getEdges
in interfaceConnection<T>
- Returns:
- a list of
Edge
s that are really a node of data and its cursor
-
getPageInfo
- Specified by:
getPageInfo
in interfaceConnection<T>
- Returns:
PageInfo
pagination data about that list of edges
-
equals
-
hashCode
public int hashCode() -
toString
-