Class TinkerVertex
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerElement
- 
- org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerVertex
 
 
- 
 public class TinkerVertex extends TinkerElement implements Vertex - Author:
- Marko A. Rodriguez (http://markorodriguez.com)
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.ElementElement.Exceptions
 - 
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.VertexVertex.Exceptions
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected AbstractTinkerGraphgraphprotected Map<String,Set<Edge>>inEdgesprotected Map<String,Set<Object>>inEdgesIdprotected Map<String,Set<Edge>>outEdgesprotected Map<String,Set<Object>>outEdgesIdprotected Map<String,List<VertexProperty>>properties- 
Fields inherited from class org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerElementcurrentVersion, id, label, removed
 - 
Fields inherited from interface org.apache.tinkerpop.gremlin.structure.VertexDEFAULT_LABEL, EMPTY_ARGS
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedTinkerVertex(Object id, String label, AbstractTinkerGraph graph)protectedTinkerVertex(Object id, String label, AbstractTinkerGraph graph, long currentVersion)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description EdgeaddEdge(String label, Vertex vertex, Object... keyValues)Add an outgoing edge to the vertex with provided label and edge properties as key/value pairs.Objectclone()protected <V> TinkerVertexProperty<V>createTinkerVertexProperty(Object id, TinkerVertex vertex, String key, V value, Object... propertyKeyValues)protected <V> TinkerVertexProperty<V>createTinkerVertexProperty(TinkerVertex vertex, String key, V value, Object... propertyKeyValues)Iterator<Edge>edges(Direction direction, String... edgeLabels)Gets anIteratorof incident edges.Graphgraph()Get the graph that this element is within.Set<String>keys()Get the keys of the properties associated with this element.<V> Iterator<VertexProperty<V>>properties(String... propertyKeys)Get anIteratorof properties where thepropertyKeysis meant to be a filter on the available keys.<V> VertexProperty<V>property(String key)Get theVertexPropertyfor the provided key.<V> VertexProperty<V>property(VertexProperty.Cardinality cardinality, String key, V value, Object... keyValues)Create a new vertex property.voidremove()Removes theElementfrom the graph.StringtoString()Iterator<Vertex>vertices(Direction direction, String... edgeLabels)Gets anIteratorof adjacent vertices.- 
Methods inherited from class org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerElementelementAlreadyRemoved, equals, hashCode, id, label, version
 - 
Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, wait
 
- 
 
- 
- 
- 
Field Detail- 
propertiesprotected Map<String,List<VertexProperty>> properties 
 - 
graphprotected final AbstractTinkerGraph graph 
 
- 
 - 
Constructor Detail- 
TinkerVertexprotected TinkerVertex(Object id, String label, AbstractTinkerGraph graph) 
 - 
TinkerVertexprotected TinkerVertex(Object id, String label, AbstractTinkerGraph graph, long currentVersion) 
 
- 
 - 
Method Detail- 
clonepublic Object clone() - Specified by:
- clonein class- TinkerElement
 
 - 
graphpublic Graph graph() Description copied from interface:ElementGet the graph that this element is within.
 - 
propertypublic <V> VertexProperty<V> property(String key) Description copied from interface:VertexGet theVertexPropertyfor the provided key. If the property does not exist, returnVertexProperty.empty(). If there are more than one vertex properties for the provided key, then throwVertex.Exceptions.multiplePropertiesExistForProvidedKey(java.lang.String).
 - 
propertypublic <V> VertexProperty<V> property(VertexProperty.Cardinality cardinality, String key, V value, Object... keyValues) Description copied from interface:VertexCreate a new vertex property. If the cardinality isVertexProperty.Cardinality.single, then set the key to the value. If the cardinality isVertexProperty.Cardinality.list, then add a new value to the key. If the cardinality isVertexProperty.Cardinality.set, then only add a new value if that value doesn't already exist for the key. If the value already exists for the key, add the provided key value vertex property properties to it.- Specified by:
- propertyin interface- Vertex
- Type Parameters:
- V- the type of the value of the vertex property
- Parameters:
- cardinality- the desired cardinality of the property key
- key- the key of the vertex property
- value- The value of the vertex property
- keyValues- the key/value pairs to turn into vertex property properties
- Returns:
- the newly created vertex property
 
 - 
keyspublic Set<String> keys() Description copied from interface:ElementGet the keys of the properties associated with this element. The default implementation iterators the properties and stores the keys into aHashSet.
 - 
addEdgepublic Edge addEdge(String label, Vertex vertex, Object... keyValues) Description copied from interface:VertexAdd an outgoing edge to the vertex with provided label and edge properties as key/value pairs. These key/values must be provided in an even number where the odd numbered arguments areStringproperty keys and the even numbered arguments are the related property values.
 - 
removepublic void remove() Description copied from interface:ElementRemoves theElementfrom the graph.
 - 
edgespublic Iterator<Edge> edges(Direction direction, String... edgeLabels) Description copied from interface:VertexGets anIteratorof incident edges.
 - 
verticespublic Iterator<Vertex> vertices(Direction direction, String... edgeLabels) Description copied from interface:VertexGets anIteratorof adjacent vertices.- Specified by:
- verticesin interface- Vertex
- Parameters:
- direction- The adjacency direction of the vertices to retrieve off this vertex
- edgeLabels- The labels of the edges associated with the vertices to retrieve. If no labels are provided, then get all edges.
- Returns:
- An iterator of vertices meeting the provided specification
 
 - 
createTinkerVertexPropertyprotected <V> TinkerVertexProperty<V> createTinkerVertexProperty(TinkerVertex vertex, String key, V value, Object... propertyKeyValues) 
 - 
createTinkerVertexPropertyprotected <V> TinkerVertexProperty<V> createTinkerVertexProperty(Object id, TinkerVertex vertex, String key, V value, Object... propertyKeyValues) 
 - 
propertiespublic <V> Iterator<VertexProperty<V>> properties(String... propertyKeys) Description copied from interface:VertexGet 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 interface- Element
- Specified by:
- propertiesin interface- Vertex
 
 
- 
 
-