public class TinkerVertexProperty<V> extends TinkerElement implements VertexProperty<V>
VertexProperty.Cardinality, VertexProperty.Exceptions| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Property> |
properties |
id, label, removedDEFAULT_LABEL| Constructor and Description |
|---|
TinkerVertexProperty(Object id,
TinkerVertex vertex,
String key,
V value,
Object... propertyKeyValues)
Use this constructor to construct
VertexProperty instances for TinkerGraph where the id
can 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 the
Graph. |
| Modifier and Type | Method and Description |
|---|---|
Vertex |
element()
Gets the
Vertex that owns this VertexProperty. |
boolean |
equals(Object object) |
Object |
id()
Gets the unique identifier for the graph
Element. |
boolean |
isPresent()
Whether the property is empty or not.
|
String |
key()
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 an
Iterator of properties. |
<U> Property<U> |
property(String key)
Get a
Property for the Element given its key. |
<U> Property<U> |
property(String key,
U value)
Add or set a property value for the
Element given its key. |
void |
remove()
Remove the property from the associated element.
|
String |
toString() |
V |
value()
The value of the property.
|
elementAlreadyRemoved, hashCode, labelclone, finalize, getClass, notify, notifyAll, wait, wait, waitempty, graph, labelifPresent, orElse, orElseGet, orElseThrowpublic TinkerVertexProperty(TinkerVertex vertex, String key, V value, Object... propertyKeyValues)
Graph. It will always just use a
Long for its identifier. This is useful for constructing a VertexProperty for usage
with TinkerGraphComputerView.public TinkerVertexProperty(Object id, TinkerVertex vertex, String key, V value, Object... propertyKeyValues)
VertexProperty instances for TinkerGraph where the id
can be explicitly set and validated against the expected data type.public boolean isPresent()
Propertypublic Object id()
ElementElement.id in interface Elementid in class TinkerElementpublic boolean equals(Object object)
equals in class TinkerElementpublic Set<String> keys()
ElementHashSet.public <U> Property<U> property(String key)
ElementProperty for the Element given its key.
The default implementation calls the raw Element.properties(java.lang.String...).public <U> Property<U> property(String key, U value)
ElementElement given its key.public Vertex element()
VertexPropertyVertex that owns this VertexProperty.element in interface Property<V>element in interface VertexProperty<V>Vertex, Edge, or VertexProperty).public void remove()
Propertypublic <U> Iterator<Property<U>> properties(String... propertyKeys)
VertexPropertyIterator of properties.properties in interface Elementproperties in interface VertexProperty<V>Copyright © 2013–2015 Apache Software Foundation. All rights reserved.