public class DetachedVertex extends DetachedElement<Vertex> implements Vertex, Vertex.Iterators
Vertex that is disconnected from a Graph. "Disconnection" can mean detachment from
a Graph in the sense that a Vertex was constructed from a Graph instance and this reference
was removed or it can mean that the DetachedVertex could have been constructed independently of a
Graph instance in the first place.
DetachedVertex only has reference to the properties that are associated with it at the time of detachment
(or construction) and is not traversable or mutable.Vertex.Exceptions, Vertex.Iteratorsid, label, propertiesDEFAULT_LABEL| Modifier | Constructor and Description |
|---|---|
|
DetachedVertex(java.lang.Object id,
java.lang.String label,
java.util.Map<java.lang.String,java.lang.Object> properties) |
protected |
DetachedVertex(Vertex vertex,
boolean withProperties) |
| Modifier and Type | Method and Description |
|---|---|
Edge |
addEdge(java.lang.String label,
Vertex inVertex,
java.lang.Object... keyValues)
Add an outgoing edge to the vertex with provided label and edge properties as key/value pairs.
|
static Vertex |
addTo(Graph graph,
DetachedVertex detachedVertex) |
Vertex |
attach(Graph hostGraph) |
Vertex |
attach(Vertex hostVertex) |
GraphTraversal<Vertex,Edge> |
edgeIterator(Direction direction,
java.lang.String... edgeLabels)
Gets an
Iterator of incident edges. |
Vertex.Iterators |
iterators()
Gets the iterators for the
Element. |
<V> VertexProperty<V> |
property(java.lang.String key)
Get a
Property for the Element given its key. |
<V> VertexProperty<V> |
property(java.lang.String key,
V value)
Add or set a property value for the
Element given its key. |
<V> java.util.Iterator<VertexProperty<V>> |
propertyIterator(java.lang.String... propertyKeys)
Get an
Iterator of properties. |
java.lang.String |
toString() |
GraphTraversal<Vertex,Vertex> |
vertexIterator(Direction direction,
java.lang.String... labels)
Gets an
Iterator of adjacent vertices. |
equals, graph, hashCode, id, label, removeclone, finalize, getClass, notify, notifyAll, wait, wait, waitproperty, singlePropertygraph, id, keys, label, remove, valueproperties, propertyMap, start, value, valueMap, valueMapaddBothE, addE, addInE, addOutE, aggregate, aggregate, as, back, between, both, bothE, bothV, branch, cap, cap, choose, choose, coin, count, cyclicPath, dedup, emit, emit, emit, except, except, except, filter, flatMap, fold, fold, group, group, groupCount, groupCount, has, has, has, has, has, has, has, hasNot, identity, in, inE, inject, inV, limit, local, map, match, order, otherV, out, outE, outV, path, profile, range, repeat, retain, retain, retain, sack, sack, sack, sample, select, select, shuffle, sideEffect, simplePath, store, store, subgraph, subgraph, subgraph, subgraph, submit, sum, timeLimit, times, to, toE, toV, tree, tree, unfold, union, until, until, values, where, where, where, withPath, withSack, withSack, withSideEffectvalueIteratorprotected DetachedVertex(Vertex vertex, boolean withProperties)
public DetachedVertex(java.lang.Object id,
java.lang.String label,
java.util.Map<java.lang.String,java.lang.Object> properties)
public <V> VertexProperty<V> property(java.lang.String key, V value)
ElementElement given its key.public <V> VertexProperty<V> property(java.lang.String key)
ElementProperty for the Element given its key.
The default implementation calls the raw Element#iterators#propertyIterator.public Edge addEdge(java.lang.String label, Vertex inVertex, java.lang.Object... keyValues)
VertexString
property keys and the even numbered arguments are the related property values.public java.lang.String toString()
toString in class java.lang.Objectpublic Vertex attach(Vertex hostVertex)
attach in interface Attachable<Vertex>public Vertex attach(Graph hostGraph)
attach in interface Attachable<Vertex>public static Vertex addTo(Graph graph, DetachedVertex detachedVertex)
public Vertex.Iterators iterators()
ElementElement. Iterators provide low-level access to the data associated with
an Element as they do not come with the overhead of Traversal
construction. Use iterators in places where performance is most crucial.public <V> java.util.Iterator<VertexProperty<V>> propertyIterator(java.lang.String... propertyKeys)
Element.IteratorsIterator of properties.propertyIterator in interface Element.IteratorspropertyIterator in interface Vertex.IteratorspropertyIterator in class DetachedElement<Vertex>public GraphTraversal<Vertex,Edge> edgeIterator(Direction direction, java.lang.String... edgeLabels)
Vertex.IteratorsIterator of incident edges.edgeIterator in interface Vertex.Iteratorsdirection - The incident direction of the edges to retrieve off this vertexedgeLabels - The labels of the edges to retrieve. If no labels are provided, then get all edges.public GraphTraversal<Vertex,Vertex> vertexIterator(Direction direction, java.lang.String... labels)
Vertex.IteratorsIterator of adjacent vertices.vertexIterator in interface Vertex.Iteratorsdirection - The adjacency direction of the vertices to retrieve off this vertexlabels - The labels of the edges associated with the vertices to retrieve. If no labels are provided, then get all edges.Copyright © 2013-2015 TinkerPop. All Rights Reserved.