public final class Neo4jVertexProperty<V> extends Object implements VertexProperty<V>
VertexProperty.Cardinality, VertexProperty.Exceptions
Modifier and Type | Field and Description |
---|---|
protected String |
key |
protected V |
value |
protected Neo4jVertex |
vertex |
protected Neo4jNode |
vertexPropertyNode |
DEFAULT_LABEL
Constructor and Description |
---|
Neo4jVertexProperty(Neo4jVertex vertex,
Neo4jNode vertexPropertyNode) |
Neo4jVertexProperty(Neo4jVertex vertex,
String key,
V value) |
Neo4jVertexProperty(Neo4jVertex vertex,
String key,
V value,
Neo4jNode vertexPropertyNode) |
Modifier and Type | Method and Description |
---|---|
Vertex |
element()
Gets the
Vertex that owns this VertexProperty . |
boolean |
equals(Object object) |
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.
|
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 where the propertyKeys is meant to be a filter on the available
keys. |
<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, graph, label
ifPresent, orElse, orElseGet, orElseThrow
protected final Neo4jVertex vertex
protected final String key
protected final V value
protected Neo4jNode vertexPropertyNode
public Neo4jVertexProperty(Neo4jVertex vertex, String key, V value)
public Neo4jVertexProperty(Neo4jVertex vertex, String key, V value, Neo4jNode vertexPropertyNode)
public Neo4jVertexProperty(Neo4jVertex vertex, Neo4jNode vertexPropertyNode)
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 V value() throws NoSuchElementException
Property
value
in interface Property<V>
NoSuchElementException
- thrown if the property is emptypublic boolean isPresent()
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>
public <U> Property<U> property(String key, U value)
Element
Element
given its key.public void remove()
Property
public Set<String> keys()
Element
HashSet
.Copyright © 2013–2020 Apache Software Foundation. All rights reserved.