Interface Edge
- All Superinterfaces:
Element
An
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.
- Author:
- Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classCommon exceptions to use with an edge. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGet both the outgoing and incoming vertices of this edge.default VertexinVertex()Get the incoming/head vertex of this edge.default VertexGet the outgoing/tail vertex of this edge.properties(String... propertyKeys) Get anIteratorof properties where thepropertyKeysis meant to be a filter on the available keys.Retrieve the vertex (or vertices) associated with this edge as defined by the direction.
-
Field Details
-
DEFAULT_LABEL
The default label to use for an edge. This is typically never used as when an edge is created, an edge label is required to be specified.- See Also:
-
-
Method Details
-
vertices
Retrieve the vertex (or vertices) associated with this edge as defined by the direction. If the direction isDirection.BOTHthen the iterator order is:Direction.OUTthenDirection.IN.- Parameters:
direction- Get the incoming vertex, outgoing vertex, or both vertices- Returns:
- An iterator with 1 or 2 vertices
-
outVertex
Get the outgoing/tail vertex of this edge.- Returns:
- the outgoing vertex of the edge
-
inVertex
Get the incoming/head vertex of this edge.- Returns:
- the incoming vertex of the edge
-
bothVertices
Get both the outgoing and incoming vertices of this edge. The first vertex in the iterator is the outgoing vertex. The second vertex in the iterator is the incoming vertex.- Returns:
- an iterator of the two vertices of this edge
-
properties
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 interfaceElement
-