Package graphql.relay
Class DefaultConnection<T>
- java.lang.Object
-
- graphql.relay.DefaultConnection<T>
-
- All Implemented Interfaces:
Connection<T>
@PublicApi public class DefaultConnection<T> extends java.lang.Object implements Connection<T>
A default implementation ofConnection
-
-
Constructor Summary
Constructors Constructor Description DefaultConnection(java.util.List<Edge<T>> edges, PageInfo pageInfo)A connection consists of a list of edges and page info
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.List<Edge<T>>getEdges()PageInfogetPageInfo()inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
DefaultConnection
public DefaultConnection(java.util.List<Edge<T>> edges, PageInfo pageInfo)
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:
java.lang.IllegalArgumentException- if edges or page info is null. useCollections.emptyList()for empty edges.
-
-
Method Detail
-
getEdges
public java.util.List<Edge<T>> getEdges()
- Specified by:
getEdgesin interfaceConnection<T>- Returns:
- a list of
Edges that are really a node of data and its cursor
-
getPageInfo
public PageInfo getPageInfo()
- Specified by:
getPageInfoin interfaceConnection<T>- Returns:
PageInfopagination data about that list of edges
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-