Interface Vertex
- 
- All Known Implementing Classes:
- ComputerGraph.ComputerAdjacentVertex,- ComputerGraph.ComputerVertex,- DetachedVertex,- ReferenceVertex,- StarGraph.StarAdjacentVertex,- StarGraph.StarVertex,- TinkerVertex
 
 public interface Vertex extends Element, Host AVertexmaintains pointers to both a set of incoming and outgoingEdgeobjects. The outgoing edges are those edges for which theVertexis the tail. The incoming edges are those edges for which theVertexis the head. Diagrammatically:---inEdges---> vertex ---outEdges--->. - Author:
- Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classVertex.ExceptionsCommon exceptions to use with a vertex.
 - 
Field SummaryFields Modifier and Type Field Description static StringDEFAULT_LABELThe default label to use for a vertex.static Object[]EMPTY_ARGS
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description EdgeaddEdge(String label, Vertex inVertex, Object... keyValues)Add an outgoing edge to the vertex with provided label and edge properties as key/value pairs.Iterator<Edge>edges(Direction direction, String... edgeLabels)Gets anIteratorof incident edges.<V> Iterator<VertexProperty<V>>properties(String... propertyKeys)Get anIteratorof properties where thepropertyKeysis meant to be a filter on the available keys.default <V> VertexProperty<V>property(String key)Get theVertexPropertyfor the provided key.default <V> VertexProperty<V>property(String key, V value)Set the provided key to the provided value usingVertexProperty.Cardinality.single.default <V> VertexProperty<V>property(String key, V value, Object... keyValues)Set the provided key to the provided value using defaultVertexProperty.Cardinalityfor that key.<V> VertexProperty<V>property(VertexProperty.Cardinality cardinality, String key, V value, Object... keyValues)Create a new vertex property.Iterator<Vertex>vertices(Direction direction, String... edgeLabels)Gets anIteratorof adjacent vertices.
 
- 
- 
- 
Field Detail- 
DEFAULT_LABELstatic final String DEFAULT_LABEL The default label to use for a vertex.- See Also:
- Constant Field Values
 
 - 
EMPTY_ARGSstatic final Object[] EMPTY_ARGS 
 
- 
 - 
Method Detail- 
addEdgeEdge addEdge(String label, Vertex inVertex, Object... keyValues) Add an outgoing edge to the vertex with provided label and edge properties as key/value pairs. These key/values must be provided in an even number where the odd numbered arguments areStringproperty keys and the even numbered arguments are the related property values.- Parameters:
- label- The label of the edge
- inVertex- The vertex to receive an incoming edge from the current vertex
- keyValues- The key/value pairs to turn into edge properties
- Returns:
- the newly created edge
 
 - 
propertydefault <V> VertexProperty<V> property(String key) Get theVertexPropertyfor the provided key. If the property does not exist, returnVertexProperty.empty(). If there are more than one vertex properties for the provided key, then throwVertex.Exceptions.multiplePropertiesExistForProvidedKey(java.lang.String).
 - 
propertydefault <V> VertexProperty<V> property(String key, V value) Set the provided key to the provided value usingVertexProperty.Cardinality.single.
 - 
propertydefault <V> VertexProperty<V> property(String key, V value, Object... keyValues) Set the provided key to the provided value using defaultVertexProperty.Cardinalityfor that key. The default cardinality can be vendor defined and is usually tied to the graph schema. The default implementation of this method determines the cardinalitygraph().features().vertex().getCardinality(key). The provided key/values are the properties of the newly createdVertexProperty. These key/values must be provided in an even number where the odd numbered arguments areString.- Type Parameters:
- V- the type of the value of the vertex property
- Parameters:
- key- the key of the vertex property
- value- The value of the vertex property
- keyValues- the key/value pairs to turn into vertex property properties
- Returns:
- the newly created vertex property
 
 - 
property<V> VertexProperty<V> property(VertexProperty.Cardinality cardinality, String key, V value, Object... keyValues) Create a new vertex property. If the cardinality isVertexProperty.Cardinality.single, then set the key to the value. If the cardinality isVertexProperty.Cardinality.list, then add a new value to the key. If the cardinality isVertexProperty.Cardinality.set, then only add a new value if that value doesn't already exist for the key. If the value already exists for the key, add the provided key value vertex property properties to it.- Type Parameters:
- V- the type of the value of the vertex property
- Parameters:
- cardinality- the desired cardinality of the property key
- key- the key of the vertex property
- value- The value of the vertex property
- keyValues- the key/value pairs to turn into vertex property properties
- Returns:
- the newly created vertex property
 
 - 
edgesIterator<Edge> edges(Direction direction, String... edgeLabels) Gets anIteratorof incident edges.- Parameters:
- direction- The incident direction of the edges to retrieve off this vertex
- edgeLabels- The labels of the edges to retrieve. If no labels are provided, then get all edges.
- Returns:
- An iterator of edges meeting the provided specification
 
 - 
verticesIterator<Vertex> vertices(Direction direction, String... edgeLabels) Gets anIteratorof adjacent vertices.- Parameters:
- direction- The adjacency direction of the vertices to retrieve off this vertex
- edgeLabels- The labels of the edges associated with the vertices to retrieve. If no labels are provided, then get all edges.
- Returns:
- An iterator of vertices meeting the provided specification
 
 - 
properties<V> Iterator<VertexProperty<V>> properties(String... propertyKeys) Get anIteratorof properties where thepropertyKeysis meant to be a filter on the available keys. If no keys are provide then return all the properties.- Specified by:
- propertiesin interface- Element
 
 
- 
 
-