Package graphql.relay

Class DefaultConnection<T>

    • 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 edges
        pageInfo - a non null page info
        Throws:
        java.lang.IllegalArgumentException - if edges or page info is null. use Collections.emptyList() for empty edges.
    • Method Detail

      • getEdges

        public java.util.List<Edge<T>> getEdges()
        Specified by:
        getEdges in interface Connection<T>
        Returns:
        a list of Edges that are really a node of data and its cursor
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object