Class LazyGraph<V>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<LazyGraph<V>>

    public class LazyGraph<V>
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Comparable<LazyGraph<V>>
    A graph which does not assume that vertex or edge ids are unique. This is useful in mappings because the id specifications for vertices and/or edges may be non-unique.
    See Also:
    Serialized Form
    • Field Detail

      • TYPE_

        public static final Name TYPE_
        Name of the hydra.pg.model.LazyGraph type.
      • VERTICES

        public static final Name VERTICES
        Name of the hydra.pg.model.LazyGraph.vertices field.
      • EDGES

        public static final Name EDGES
        Name of the hydra.pg.model.LazyGraph.edges field.
      • vertices

        public final java.util.List<Vertex<V>> vertices
      • edges

        public final java.util.List<Edge<V>> edges
    • Constructor Detail

      • LazyGraph

        public LazyGraph​(java.util.List<Vertex<V>> vertices,
                         java.util.List<Edge<V>> edges)
        Constructs an immutable LazyGraph.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object other)
        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
      • compareTo

        public int compareTo​(LazyGraph other)
        Specified by:
        compareTo in interface java.lang.Comparable<V>
      • withVertices

        public LazyGraph withVertices​(java.util.List<Vertex<V>> vertices)
        Returns a copy of this LazyGraph with vertices replaced.
      • withEdges

        public LazyGraph withEdges​(java.util.List<Edge<V>> edges)
        Returns a copy of this LazyGraph with edges replaced.