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:
getEdgesin interfaceConnection<T>- Returns:
- a list of
Edges that are really a node of data and its cursor
-
getPageInfo
- Specified by:
getPageInfoin interfaceConnection<T>- Returns:
PageInfopagination data about that list of edges
-
equals
-
hashCode
public int hashCode() -
toString
-