Interface VertexProperty<V>
- All Known Implementing Classes:
ComputerGraph.ComputerVertexProperty,DetachedVertexProperty,EmptyVertexProperty,KeyedVertexProperty,ReferenceVertexProperty,StarGraph.StarVertexProperty,TinkerVertexProperty
A
VertexProperty is similar to a Property in that it denotes a key/value pair associated with an
Vertex, however it is different in the sense that it also represents an entity that it is an Element
that can have properties of its own.
A property is much like a Java8 Optional 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 ClassesModifier and TypeInterfaceDescriptionstatic enumstatic classCommon exceptions to use with a property. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionelement()Gets theVertexthat owns thisVertexProperty.static <V> VertexProperty<V>empty()Constructs an emptyVertexProperty.default Graphgraph()Get the graph that this element is within.default Stringlabel()Gets the label for the graphElementwhich helps categorize it.labels()Returns a singleton set containing the property key, consistent with the single-label semantics ofVertexProperty.properties(String... propertyKeys) Get anIteratorof properties where thepropertyKeysis meant to be a filter on the available keys.
-
Field Details
-
DEFAULT_LABEL
- See Also:
-
-
Method Details
-
element
Vertex element()Gets theVertexthat owns thisVertexProperty. -
graph
Get the graph that this element is within. -
label
Gets the label for the graphElementwhich helps categorize it. -
labels
Returns a singleton set containing the property key, consistent with the single-label semantics ofVertexProperty. -
empty
Constructs an emptyVertexProperty.- Type Parameters:
V- The value class of the empty property- Returns:
- A property that is not present
-
properties
Get 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
-