Class AbstractPropertyGraph.SimpleVertex
- All Implemented Interfaces:
PropertyGraph.Vertex<ID>
- Enclosing class:
- AbstractPropertyGraph<ID>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the set of all edges connecting to this vertex.boolean
Returns true if this vertex and id vertex is connected.connectsFrom
(ID source) Ensures this vertex connects to the vertex with an id property equal to the source parameter.connectsTo
(ID target) Ensures this vertex connects to the vertex with an 'id' property equal to the target parameter.final boolean
<T> Optional<T>
findProperty
(String name) ReturnsOptional
of a property.getId()
returns identifier of vertex.<T> T
getProperty
(String name) Returns a property.final int
hashCode()
sets identifier of this vertex.inEdges()
Returns the set of edges connecting to this vertex where target is the id of this vertexReturns an unmodifiable map of inherited propertieslocal()
Returns an unmodifiable map of local propertiesoutEdges()
Returns the set of edges connecting to this vertex where source is the id of this vertexSets the value of a local property returning this vertex.property
(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4) property
(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5) property
(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5, String name6, Object value6) property
(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5, String name6, Object value6, String name7, Object value7) property
(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5, String name6, Object value6, String name7, Object value7, String name8, Object value8) property
(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5, String name6, Object value6, String name7, Object value7, String name8, Object value8, String name9, Object value9) property
(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5, String name6, Object value6, String name7, Object value7, String name8, Object value8, String name9, Object value9, String name10, Object value10) remove()
Removes this vertex from the graph.removeProperty
(String name) Removes property from local properties returning this vertex.void
sets identifier of vertex.void
setProperty
(String name, Object value) Sets the value of a local property.toString()
-
Constructor Details
-
SimpleVertex
-
-
Method Details
-
inherited
Description copied from interface:PropertyGraph.Vertex
Returns an unmodifiable map of inherited properties- Specified by:
inherited
in interfacePropertyGraph.Vertex<ID>
- Returns:
- map of inherited properties
-
local
Description copied from interface:PropertyGraph.Vertex
Returns an unmodifiable map of local properties- Specified by:
local
in interfacePropertyGraph.Vertex<ID>
- Returns:
- map of local properties
-
getId
Description copied from interface:PropertyGraph.Vertex
returns identifier of vertex.- Specified by:
getId
in interfacePropertyGraph.Vertex<ID>
- Returns:
- identifier of vertex
-
setId
Description copied from interface:PropertyGraph.Vertex
sets identifier of vertex.- Specified by:
setId
in interfacePropertyGraph.Vertex<ID>
- Parameters:
id
- identifier of vertex
-
id
Description copied from interface:PropertyGraph.Vertex
sets identifier of this vertex. This vertex is returned.- Specified by:
id
in interfacePropertyGraph.Vertex<ID>
- Parameters:
id
- identifier of vertex.- Returns:
- this vertex
-
findProperty
Description copied from interface:PropertyGraph.Vertex
ReturnsOptional
of a property. If the property does not exist the returnedOptional
is empty.A property is resolved by first checking properties set on this vertex. If the local property does not exist vertexProperties in the graph are checked.
- Specified by:
findProperty
in interfacePropertyGraph.Vertex<ID>
- Parameters:
name
- of property- Returns:
- optional of named property
-
getProperty
Description copied from interface:PropertyGraph.Vertex
Returns a property. If the property does not exist null is returned.A property is resolved by first checking properties set on this vertex. If the local property does not exist vertexProperties in the graph are checked.
- Specified by:
getProperty
in interfacePropertyGraph.Vertex<ID>
- Type Parameters:
T
- return type of property- Parameters:
name
- of property- Returns:
- value of named property
-
setProperty
Description copied from interface:PropertyGraph.Vertex
Sets the value of a local property.- Specified by:
setProperty
in interfacePropertyGraph.Vertex<ID>
- Parameters:
name
- of propertyvalue
- of property
-
property
Description copied from interface:PropertyGraph.Vertex
Sets the value of a local property returning this vertex.- Specified by:
property
in interfacePropertyGraph.Vertex<ID>
- Parameters:
name
- of propertyvalue
- of property- Returns:
- this vertex
-
property
- Specified by:
property
in interfacePropertyGraph.Vertex<ID>
-
property
public PropertyGraph.Vertex<ID> property(String name1, Object value1, String name2, Object value2, String name3, Object value3) - Specified by:
property
in interfacePropertyGraph.Vertex<ID>
-
property
public PropertyGraph.Vertex<ID> property(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4) - Specified by:
property
in interfacePropertyGraph.Vertex<ID>
-
property
public PropertyGraph.Vertex<ID> property(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5) - Specified by:
property
in interfacePropertyGraph.Vertex<ID>
-
property
public PropertyGraph.Vertex<ID> property(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5, String name6, Object value6) - Specified by:
property
in interfacePropertyGraph.Vertex<ID>
-
property
public PropertyGraph.Vertex<ID> property(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5, String name6, Object value6, String name7, Object value7) - Specified by:
property
in interfacePropertyGraph.Vertex<ID>
-
property
public PropertyGraph.Vertex<ID> property(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5, String name6, Object value6, String name7, Object value7, String name8, Object value8) - Specified by:
property
in interfacePropertyGraph.Vertex<ID>
-
property
public PropertyGraph.Vertex<ID> property(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5, String name6, Object value6, String name7, Object value7, String name8, Object value8, String name9, Object value9) - Specified by:
property
in interfacePropertyGraph.Vertex<ID>
-
property
public PropertyGraph.Vertex<ID> property(String name1, Object value1, String name2, Object value2, String name3, Object value3, String name4, Object value4, String name5, Object value5, String name6, Object value6, String name7, Object value7, String name8, Object value8, String name9, Object value9, String name10, Object value10) - Specified by:
property
in interfacePropertyGraph.Vertex<ID>
-
property
- Specified by:
property
in interfacePropertyGraph.Vertex<ID>
-
removeProperty
Description copied from interface:PropertyGraph.Vertex
Removes property from local properties returning this vertex.- Specified by:
removeProperty
in interfacePropertyGraph.Vertex<ID>
- Parameters:
name
- of property- Returns:
- this vertex
-
connectsTo
Description copied from interface:PropertyGraph.Vertex
Ensures this vertex connects to the vertex with an 'id' property equal to the target parameter. The edge or vertex is created if needed. This vertex is returned.If a vertex is created its 'id' property will be set to the target parameter. If an edge is created the source property is set to the 'id' of this vertex and the target property is set to the 'id' of the target vertex.
If this graph is undirected and contains an edge connecting this vertex with target the edge will not be created. Undirected graphs ignore source/target order in edges.
- Specified by:
connectsTo
in interfacePropertyGraph.Vertex<ID>
- Parameters:
target
- vertex id- Returns:
- this vertex
-
connectsFrom
Description copied from interface:PropertyGraph.Vertex
Ensures this vertex connects to the vertex with an id property equal to the source parameter. The edge or vertex is created if needed. This vertex is returned.If a vertex is created its id property will be set to the source parameter. If an edge is created the target property is set to the id of the source vertex and the target property is set to the id of this vertex.
If this graph is undirected and contains an edge connecting this vertex with source the edge will not be created. Undirected graphs ignore source/target order in edges.
- Specified by:
connectsFrom
in interfacePropertyGraph.Vertex<ID>
- Parameters:
source
- vertex id- Returns:
- this vertex
-
adjacentEdges
Description copied from interface:PropertyGraph.Vertex
Returns the set of all edges connecting to this vertex.- Specified by:
adjacentEdges
in interfacePropertyGraph.Vertex<ID>
- Returns:
- set of adjacent edges
-
inEdges
Description copied from interface:PropertyGraph.Vertex
Returns the set of edges connecting to this vertex where target is the id of this vertex- Specified by:
inEdges
in interfacePropertyGraph.Vertex<ID>
- Returns:
- incoming edges
-
outEdges
Description copied from interface:PropertyGraph.Vertex
Returns the set of edges connecting to this vertex where source is the id of this vertex- Specified by:
outEdges
in interfacePropertyGraph.Vertex<ID>
- Returns:
- outgoing edges
-
remove
Description copied from interface:PropertyGraph.Vertex
Removes this vertex from the graph.- Specified by:
remove
in interfacePropertyGraph.Vertex<ID>
- Returns:
- this vertex
-
connected
Description copied from interface:PropertyGraph.Vertex
Returns true if this vertex and id vertex is connected.- Specified by:
connected
in interfacePropertyGraph.Vertex<ID>
- Parameters:
id
- of vertex- Returns:
- true if the two vertices are connected
-
equals
-
hashCode
public final int hashCode() -
toString
-