Class TinkerEdge
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerElement
-
- org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerEdge
-
public class TinkerEdge extends TinkerElement implements Edge
- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.Edge
Edge.Exceptions
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.Element
Element.Exceptions
-
-
Field Summary
Fields Modifier and Type Field Description protected Vertex
inVertex
protected Object
inVertexId
protected Vertex
outVertex
protected Object
outVertexId
protected Map<String,Property>
properties
-
Fields inherited from class org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerElement
currentVersion, id, label, removed
-
Fields inherited from interface org.apache.tinkerpop.gremlin.structure.Edge
DEFAULT_LABEL
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TinkerEdge(Object id, Vertex outVertex, String label, Vertex inVertex)
protected
TinkerEdge(Object id, Vertex outVertex, String label, Vertex inVertex, long currentVersion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
Graph
graph()
Get the graph that this element is within.Vertex
inVertex()
Get the incoming/head vertex of this edge.Set<String>
keys()
Get the keys of the properties associated with this element.Vertex
outVertex()
Get the outgoing/tail vertex of this edge.<V> Iterator<Property<V>>
properties(String... propertyKeys)
Get anIterator
of properties where thepropertyKeys
is meant to be a filter on the available keys.<V> Property<V>
property(String key)
Get aProperty
for theElement
given its key.<V> Property<V>
property(String key, V value)
Add or set a property value for theElement
given its key.void
remove()
Removes theElement
from the graph.String
toString()
Iterator<Vertex>
vertices(Direction direction)
Retrieve the vertex (or vertices) associated with this edge as defined by the direction.-
Methods inherited from class org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerElement
elementAlreadyRemoved, equals, hashCode, id, label, version
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.tinkerpop.gremlin.structure.Edge
bothVertices
-
-
-
-
Method Detail
-
property
public <V> Property<V> property(String key, V value)
Description copied from interface:Element
Add or set a property value for theElement
given its key.
-
property
public <V> Property<V> property(String key)
Description copied from interface:Element
Get aProperty
for theElement
given its key. The default implementation calls the rawElement.properties(java.lang.String...)
.
-
keys
public Set<String> keys()
Description copied from interface:Element
Get the keys of the properties associated with this element. The default implementation iterators the properties and stores the keys into aHashSet
.
-
remove
public void remove()
Description copied from interface:Element
Removes theElement
from the graph.
-
clone
public Object clone()
- Specified by:
clone
in classTinkerElement
-
outVertex
public Vertex outVertex()
Description copied from interface:Edge
Get the outgoing/tail vertex of this edge.
-
inVertex
public Vertex inVertex()
Description copied from interface:Edge
Get the incoming/head vertex of this edge.
-
vertices
public Iterator<Vertex> vertices(Direction direction)
Description copied from interface:Edge
Retrieve the vertex (or vertices) associated with this edge as defined by the direction. If the direction isDirection.BOTH
then the iterator order is:Direction.OUT
thenDirection.IN
.
-
graph
public Graph graph()
Description copied from interface:Element
Get the graph that this element is within.
-
properties
public <V> Iterator<Property<V>> properties(String... propertyKeys)
Description copied from interface:Edge
Get anIterator
of properties where thepropertyKeys
is meant to be a filter on the available keys. If no keys are provide then return all the properties.- Specified by:
properties
in interfaceEdge
- Specified by:
properties
in interfaceElement
-
-