public final class KeyedVertexProperty<V> extends Object implements VertexProperty<V>
Property
that only has a key but no value and no meta-properties.VertexProperty.Cardinality, VertexProperty.Exceptions
DEFAULT_LABEL
Constructor and Description |
---|
KeyedVertexProperty(String key) |
Modifier and Type | Method and Description |
---|---|
Vertex |
element()
Gets the
Vertex that owns this VertexProperty . |
boolean |
equals(Object o) |
Graph |
graph()
Get the graph that this element is within.
|
int |
hashCode() |
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.
|
<U> Iterator<Property<U>> |
properties(String... propertyKeys)
Get an
Iterator of properties where the propertyKeys is meant to be a filter on the available
keys. |
<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.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
empty, label
ifPresent, orElse, orElseGet, orElseThrow
public KeyedVertexProperty(String key)
public Vertex element()
VertexProperty
Vertex
that owns this VertexProperty
.element
in interface Property<V>
element
in interface VertexProperty<V>
Vertex
, Edge
, or VertexProperty
).public Object id()
Element
Element
.public Graph graph()
VertexProperty
graph
in interface Element
graph
in interface VertexProperty<V>
public <U> Property<U> property(String key)
Element
Property
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)
Element
Element
given its key.public V value() throws NoSuchElementException
Property
value
in interface Property<V>
NoSuchElementException
- thrown if the property is emptypublic boolean isPresent()
Property
public void remove()
Property
public <U> Iterator<Property<U>> properties(String... propertyKeys)
VertexProperty
Iterator
of properties where the propertyKeys
is meant to be a filter on the available
keys. If no keys are provide then return all the properties.properties
in interface Element
properties
in interface VertexProperty<V>
Copyright © 2013–2020 Apache Software Foundation. All rights reserved.