Class TinkerVertexProperty<V>
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerElement
-
- org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerVertexProperty<V>
-
- All Implemented Interfaces:
Element,Property<V>,VertexProperty<V>
public class TinkerVertexProperty<V> extends TinkerElement implements VertexProperty<V>
- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.Element
Element.Exceptions
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.VertexProperty
VertexProperty.Cardinality, VertexProperty.Exceptions
-
-
Field Summary
Fields Modifier and Type Field Description 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.VertexProperty
DEFAULT_LABEL
-
-
Constructor Summary
Constructors Constructor Description TinkerVertexProperty(Object id, TinkerVertex vertex, String key, V value, Object... propertyKeyValues)Use this constructor to constructVertexPropertyinstances forTinkerGraphwhere theidcan be explicitly set and validated against the expected data type.TinkerVertexProperty(TinkerVertex vertex, String key, V value, Object... propertyKeyValues)This constructor will not validate the ID type against theGraph.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()TinkerVertexPropertycopy(TinkerVertex newOwner)Vertexelement()Gets theVertexthat owns thisVertexProperty.booleanequals(Object object)Objectid()Gets the unique identifier for the graphElement.booleanisPresent()Whether the property is empty or not.Stringkey()The key of the property.Set<String>keys()Get the keys of the properties associated with this element.<U> Iterator<Property<U>>properties(String... propertyKeys)Get anIteratorof properties where thepropertyKeysis meant to be a filter on the available keys.<U> Property<U>property(String key)Get aPropertyfor theElementgiven its key.<U> Property<U>property(String key, U value)Add or set a property value for theElementgiven its key.voidremove()Remove the property from the associated element.StringtoString()Vvalue()The value of the property.-
Methods inherited from class org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerElement
elementAlreadyRemoved, hashCode, 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.Property
ifPresent, orElse, orElseGet, orElseThrow
-
Methods inherited from interface org.apache.tinkerpop.gremlin.structure.VertexProperty
graph, label
-
-
-
-
Constructor Detail
-
TinkerVertexProperty
public TinkerVertexProperty(TinkerVertex vertex, String key, V value, Object... propertyKeyValues)
This constructor will not validate the ID type against theGraph. It will always just use aLongfor its identifier. This is useful for constructing aVertexPropertyfor usage withTinkerGraphComputerView.
-
TinkerVertexProperty
public TinkerVertexProperty(Object id, TinkerVertex vertex, String key, V value, Object... propertyKeyValues)
Use this constructor to constructVertexPropertyinstances forTinkerGraphwhere theidcan be explicitly set and validated against the expected data type.
-
-
Method Detail
-
isPresent
public boolean isPresent()
Description copied from interface:PropertyWhether the property is empty or not.
-
clone
public Object clone()
- Specified by:
clonein classTinkerElement
-
copy
public TinkerVertexProperty copy(TinkerVertex newOwner)
-
id
public Object id()
Description copied from interface:ElementGets the unique identifier for the graphElement.- Specified by:
idin interfaceElement- Overrides:
idin classTinkerElement- Returns:
- The id of the element
-
equals
public boolean equals(Object object)
- Overrides:
equalsin classTinkerElement
-
keys
public 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.
-
property
public <U> Property<U> property(String key)
Description copied from interface:ElementGet aPropertyfor theElementgiven its key. The default implementation calls the rawElement.properties(java.lang.String...).
-
property
public <U> Property<U> property(String key, U value)
Description copied from interface:ElementAdd or set a property value for theElementgiven its key.
-
element
public Vertex element()
Description copied from interface:VertexPropertyGets theVertexthat owns thisVertexProperty.- Specified by:
elementin interfaceProperty<V>- Specified by:
elementin interfaceVertexProperty<V>- Returns:
- The element associated with this property (i.e.
Vertex,Edge, orVertexProperty).
-
remove
public void remove()
Description copied from interface:PropertyRemove the property from the associated element.
-
properties
public <U> Iterator<Property<U>> properties(String... propertyKeys)
Description copied from interface:VertexPropertyGet 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- Specified by:
propertiesin interfaceVertexProperty<V>
-
-