Package hydra.pg.graphson.syntax
Class Vertex
- java.lang.Object
-
- hydra.pg.graphson.syntax.Vertex
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Vertex>
public class Vertex extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<Vertex>
A GraphSON vertex, with its incident edges and properties- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVertex.BuilderA fluent builder forVertex.
-
Field Summary
Fields Modifier and Type Field Description Valueidstatic NameIDName of thehydra.pg.graphson.syntax.Vertex.idfield.static NameIN_EDGESName of thehydra.pg.graphson.syntax.Vertex.inEdgesfield.java.util.Map<EdgeLabel,java.util.List<AdjacentEdge>>inEdgesOptional<VertexLabel>labelstatic NameLABELName of thehydra.pg.graphson.syntax.Vertex.labelfield.static NameOUT_EDGESName of thehydra.pg.graphson.syntax.Vertex.outEdgesfield.java.util.Map<EdgeLabel,java.util.List<AdjacentEdge>>outEdgesjava.util.Map<PropertyKey,java.util.List<VertexPropertyValue>>propertiesstatic NamePROPERTIESName of thehydra.pg.graphson.syntax.Vertex.propertiesfield.static NameTYPE_Name of thehydra.pg.graphson.syntax.Vertextype.
-
Constructor Summary
Constructors Constructor Description Vertex(Value id, Optional<VertexLabel> label, java.util.Map<EdgeLabel,java.util.List<AdjacentEdge>> inEdges, java.util.Map<EdgeLabel,java.util.List<AdjacentEdge>> outEdges, java.util.Map<PropertyKey,java.util.List<VertexPropertyValue>> properties)Constructs an immutableVertex.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Vertex.Builderbuilder()Creates a new fluent builder forVertex.intcompareTo(Vertex other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()VertexwithId(Value id)Returns a copy of thisVertexwithidreplaced.VertexwithInEdges(java.util.Map<EdgeLabel,java.util.List<AdjacentEdge>> inEdges)Returns a copy of thisVertexwithinEdgesreplaced.VertexwithLabel(Optional<VertexLabel> label)Returns a copy of thisVertexwithlabelreplaced.VertexwithOutEdges(java.util.Map<EdgeLabel,java.util.List<AdjacentEdge>> outEdges)Returns a copy of thisVertexwithoutEdgesreplaced.VertexwithProperties(java.util.Map<PropertyKey,java.util.List<VertexPropertyValue>> properties)Returns a copy of thisVertexwithpropertiesreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.pg.graphson.syntax.Vertextype.
-
ID
public static final Name ID
Name of thehydra.pg.graphson.syntax.Vertex.idfield.
-
LABEL
public static final Name LABEL
Name of thehydra.pg.graphson.syntax.Vertex.labelfield.
-
IN_EDGES
public static final Name IN_EDGES
Name of thehydra.pg.graphson.syntax.Vertex.inEdgesfield.
-
OUT_EDGES
public static final Name OUT_EDGES
Name of thehydra.pg.graphson.syntax.Vertex.outEdgesfield.
-
PROPERTIES
public static final Name PROPERTIES
Name of thehydra.pg.graphson.syntax.Vertex.propertiesfield.
-
id
public final Value id
-
label
public final Optional<VertexLabel> label
-
inEdges
public final java.util.Map<EdgeLabel,java.util.List<AdjacentEdge>> inEdges
-
outEdges
public final java.util.Map<EdgeLabel,java.util.List<AdjacentEdge>> outEdges
-
properties
public final java.util.Map<PropertyKey,java.util.List<VertexPropertyValue>> properties
-
-
Constructor Detail
-
Vertex
public Vertex(Value id, Optional<VertexLabel> label, java.util.Map<EdgeLabel,java.util.List<AdjacentEdge>> inEdges, java.util.Map<EdgeLabel,java.util.List<AdjacentEdge>> outEdges, java.util.Map<PropertyKey,java.util.List<VertexPropertyValue>> properties)
Constructs an immutableVertex.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- 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
-
compareTo
public int compareTo(Vertex other)
- Specified by:
compareToin interfacejava.lang.Comparable<Vertex>
-
withLabel
public Vertex withLabel(Optional<VertexLabel> label)
Returns a copy of thisVertexwithlabelreplaced.
-
withInEdges
public Vertex withInEdges(java.util.Map<EdgeLabel,java.util.List<AdjacentEdge>> inEdges)
Returns a copy of thisVertexwithinEdgesreplaced.
-
withOutEdges
public Vertex withOutEdges(java.util.Map<EdgeLabel,java.util.List<AdjacentEdge>> outEdges)
Returns a copy of thisVertexwithoutEdgesreplaced.
-
withProperties
public Vertex withProperties(java.util.Map<PropertyKey,java.util.List<VertexPropertyValue>> properties)
Returns a copy of thisVertexwithpropertiesreplaced.
-
builder
public static Vertex.Builder builder()
Creates a new fluent builder forVertex.
-
-