Interface Edge
- 
- All Superinterfaces:
- Element
 - All Known Implementing Classes:
- ComputerGraph.ComputerEdge,- DetachedEdge,- ReferenceEdge,- StarGraph.StarEdge,- StarGraph.StarInEdge,- StarGraph.StarOutEdge,- TinkerEdge
 
 public interface Edge extends Element AnEdgelinks twoVertexobjects. Along with itsPropertyobjects, anEdgehas both aDirectionand alabel. TheDirectiondetermines whichVertexis the tailVertex(outVertex) and whichVertexis the headVertex(inVertex). TheEdgelabeldetermines 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 SummaryNested Classes Modifier and Type Interface Description static classEdge.ExceptionsCommon exceptions to use with an edge.
 - 
Field SummaryFields Modifier and Type Field Description static StringDEFAULT_LABELThe default label to use for an edge.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Iterator<Vertex>bothVertices()Get both the outgoing and incoming vertices of this edge.default VertexinVertex()Get the incoming/head vertex of this edge.default VertexoutVertex()Get the outgoing/tail vertex of this edge.<V> Iterator<Property<V>>properties(String... propertyKeys)Get anIteratorof properties where thepropertyKeysis 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.
 
- 
- 
- 
Field Detail- 
DEFAULT_LABELstatic final String 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:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
verticesIterator<Vertex> vertices(Direction direction) 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
 
 - 
outVertexdefault Vertex outVertex() Get the outgoing/tail vertex of this edge.- Returns:
- the outgoing vertex of the edge
 
 - 
inVertexdefault Vertex inVertex() Get the incoming/head vertex of this edge.- Returns:
- the incoming vertex of the edge
 
 - 
bothVerticesdefault Iterator<Vertex> 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
 
 
- 
 
-