public interface Edge extends Element
Edge
links two Vertex
objects. Along with its Property
objects, an Edge
has both
a Direction
and a label
. The Direction
determines which Vertex
is the tail
Vertex
(out Vertex
) and which Vertex
is the head Vertex
(in Vertex
). The Edge
label
determines the type of relationship that exists between the
two vertices.
Diagrammatically:
outVertex ---label---> inVertex.
Modifier and Type | Interface and Description |
---|---|
static class |
Edge.Exceptions
Common exceptions to use with an edge.
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_LABEL
The default label to use for an edge.
|
Modifier and Type | Method and Description |
---|---|
default Iterator<Vertex> |
bothVertices()
Get both the outgoing and incoming vertices of this edge.
|
default Vertex |
inVertex()
Get the incoming/head vertex of this edge.
|
default Vertex |
outVertex()
Get the outgoing/tail vertex of this edge.
|
<V> Iterator<Property<V>> |
properties(String... propertyKeys)
Get an
Iterator of properties where the propertyKeys is meant to be a filter on the available
keys. |
Iterator<Vertex> |
vertices(Direction direction)
Retrieve the vertex (or vertices) associated with this edge as defined by the direction.
|
static final String DEFAULT_LABEL
Iterator<Vertex> vertices(Direction direction)
Direction.BOTH
then the iterator order is: Direction.OUT
then Direction.IN
.direction
- Get the incoming vertex, outgoing vertex, or both verticesdefault Vertex outVertex()
default Vertex inVertex()
default Iterator<Vertex> bothVertices()
Copyright © 2013–2023 Apache Software Foundation. All rights reserved.