Interface VertexProperty<V>
-
- All Known Implementing Classes:
ComputerGraph.ComputerVertexProperty
,DetachedVertexProperty
,EmptyVertexProperty
,KeyedVertexProperty
,ReferenceVertexProperty
,StarGraph.StarVertexProperty
,TinkerVertexProperty
public interface VertexProperty<V> extends Property<V>, Element
AVertexProperty
is similar to aProperty
in that it denotes a key/value pair associated with anVertex
, however it is different in the sense that it also represents an entity that it is anElement
that can have properties of its own. A property is much like a Java8Optional
in that a property can be not present (i.e. empty). The key of a property is always a String and the value of a property is an arbitrary Java object. Each underlying graph engine will typically have constraints on what Java objects are allowed to be used as values.- Author:
- Matthias Broecheler (me@matthiasb.com), Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
VertexProperty.Cardinality
static class
VertexProperty.Exceptions
Common exceptions to use with a property.
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_LABEL
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Vertex
element()
Gets theVertex
that owns thisVertexProperty
.static <V> VertexProperty<V>
empty()
Constructs an emptyVertexProperty
.default Graph
graph()
Get the graph that this element is within.default String
label()
Gets the label for the graphElement
which helps categorize it.<U> Iterator<Property<U>>
properties(String... propertyKeys)
Get anIterator
of properties where thepropertyKeys
is meant to be a filter on the available keys.
-
-
-
Field Detail
-
DEFAULT_LABEL
static final String DEFAULT_LABEL
- See Also:
- Constant Field Values
-
-
Method Detail
-
graph
default Graph graph()
Get the graph that this element is within.
-
label
default String label()
Gets the label for the graphElement
which helps categorize it.
-
empty
static <V> VertexProperty<V> empty()
Constructs an emptyVertexProperty
.- Type Parameters:
V
- The value class of the empty property- Returns:
- A property that is not present
-
-