Class Vertex<V>

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

    public class Vertex<V>
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Comparable<Vertex<V>>
    A vertex
    See Also:
    Serialized Form
    • Field Detail

      • TYPE_

        public static final Name TYPE_
        Name of the hydra.pg.model.Vertex type.
      • LABEL

        public static final Name LABEL
        Name of the hydra.pg.model.Vertex.label field.
      • ID

        public static final Name ID
        Name of the hydra.pg.model.Vertex.id field.
      • PROPERTIES

        public static final Name PROPERTIES
        Name of the hydra.pg.model.Vertex.properties field.
      • label

        public final VertexLabel label
        The label of the vertex
      • id

        public final V id
        The unique identifier of the vertex
      • properties

        public final java.util.Map<PropertyKey,​V> properties
        A key/value map of vertex properties
    • Constructor Detail

      • Vertex

        public Vertex​(VertexLabel label,
                      V id,
                      java.util.Map<PropertyKey,​V> properties)
        Constructs an immutable Vertex.
        Parameters:
        label - The label of the vertex
        id - The unique identifier of the vertex
        properties - A key/value map of vertex properties
    • 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​(Vertex other)
        Specified by:
        compareTo in interface java.lang.Comparable<V>
      • withId

        public Vertex withId​(V id)
        Returns a copy of this Vertex with id replaced.
      • withProperties

        public Vertex withProperties​(java.util.Map<PropertyKey,​V> properties)
        Returns a copy of this Vertex with properties replaced.