Class AbstractEventGraph.EventVertex
- java.lang.Object
-
- com.github.moaxcp.graphs.AbstractGraph.SimpleVertex
-
- com.github.moaxcp.graphs.greenrobot.AbstractEventGraph.EventVertex
-
- All Implemented Interfaces:
Graph.Vertex<ID>
- Enclosing class:
- AbstractEventGraph<ID>
public class AbstractEventGraph.EventVertex extends AbstractGraph.SimpleVertex
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EventVertex(ID id, Map<String,Object> inherited)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Object>
getProperty(String name)
Returns the value of a property.Map<String,Object>
inherited()
Returns inherited properties as an unmodifiableMap.Map<String,Object>
local()
Returns an unmodifiableMap
of all properties set on this Element.SELF
property(String name, Object value)
Adds a local property to this element returning it.Graph.Vertex<ID>
removeProperty(String name)
Removes local propertyvoid
setId(ID id)
sets identifier of vertex.void
setProperty(String name, Object value)
Adds a local property to this element.-
Methods inherited from class com.github.moaxcp.graphs.AbstractGraph.SimpleVertex
adjacentEdges, connectsFrom, connectsTo, edgeFrom, edgeTo, equals, fromVertex, getId, hashCode, id, inEdges, outEdges, toVertex
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.moaxcp.graphs.Graph.Vertex
getProperty, inherited, local, property
-
-
-
-
Method Detail
-
setId
public void setId(ID id)
Description copied from interface:Graph.Vertex
sets identifier of vertex.- Specified by:
setId
in interfaceGraph.Vertex<ID>
- Overrides:
setId
in classAbstractGraph.SimpleVertex
- Parameters:
id
- identifier of vertex
-
setProperty
public void setProperty(String name, Object value)
Adds a local property to this element.- Specified by:
setProperty
in interfaceGraph.Vertex<ID>
- Overrides:
setProperty
in classAbstractGraph.SimpleVertex
- Parameters:
name
- of propertyvalue
- of property
-
removeProperty
public Graph.Vertex<ID> removeProperty(String name)
Removes local property- Specified by:
removeProperty
in interfaceGraph.Vertex<ID>
- Overrides:
removeProperty
in classAbstractGraph.SimpleVertex
- Parameters:
name
- of property- Returns:
- this element
-
inherited
public final Map<String,Object> inherited()
Returns inherited properties as an unmodifiableMap.- Returns:
- inherited properties
-
local
public final Map<String,Object> local()
Returns an unmodifiableMap
of all properties set on this Element.- Returns:
- all properties set on this element
-
getProperty
public final Optional<Object> getProperty(String name)
Returns the value of a property. If the property is local its value is returned before checking for an inherited property.- Parameters:
name
- of property to return- Returns:
- value mapped to name
- Throws:
NullPointerException
- if name is null
-
-