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>
- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.Element
Element.ExceptionsNested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.VertexProperty
VertexProperty.Cardinality, VertexProperty.Exceptions -
Field Summary
FieldsFields inherited from class org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerElement
currentVersion, id, label, removedFields inherited from interface org.apache.tinkerpop.gremlin.structure.VertexProperty
DEFAULT_LABEL -
Constructor Summary
ConstructorsConstructorDescriptionTinkerVertexProperty(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
Modifier and TypeMethodDescriptionclone()copy(TinkerVertex newOwner) element()Gets theVertexthat owns thisVertexProperty.booleanid()Gets the unique identifier for the graphElement.booleanWhether the property is empty or not.key()The key of the property.keys()Get the keys of the properties associated with this element.properties(String... propertyKeys) Get anIteratorof properties where thepropertyKeysis meant to be a filter on the available keys.<U> Property<U>Get aPropertyfor theElementgiven its key.<U> Property<U>Add or set a property value for theElementgiven its key.voidremove()Remove the property from the associated element.toString()value()The value of the property.Methods inherited from class org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerElement
elementAlreadyRemoved, hashCode, label, versionMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.tinkerpop.gremlin.structure.Element
addLabel, dropLabel, dropLabels, value, valuesMethods inherited from interface org.apache.tinkerpop.gremlin.structure.Property
ifPresent, orElse, orElseGet, orElseThrowMethods inherited from interface org.apache.tinkerpop.gremlin.structure.VertexProperty
graph, label, labels
-
Field Details
-
properties
-
-
Constructor Details
-
TinkerVertexProperty
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 Details
-
key
Description copied from interface:PropertyThe key of the property. -
value
Description copied from interface:PropertyThe value of the property. -
isPresent
public boolean isPresent()Description copied from interface:PropertyWhether the property is empty or not. -
toString
-
clone
- Specified by:
clonein classTinkerElement
-
copy
-
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
- Overrides:
equalsin classTinkerElement
-
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
Description copied from interface:ElementGet aPropertyfor theElementgiven its key. The default implementation calls the rawElement.properties(java.lang.String...). -
property
Description copied from interface:ElementAdd or set a property value for theElementgiven its key. -
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
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>
-