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 protectedEventVertex(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 unmodifiableMapof all properties set on this Element.SELFproperty(String name, Object value)Adds a local property to this element returning it.Graph.Vertex<ID>removeProperty(String name)Removes local propertyvoidsetId(ID id)sets identifier of vertex.voidsetProperty(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.Vertexsets identifier of vertex.- Specified by:
setIdin interfaceGraph.Vertex<ID>- Overrides:
setIdin classAbstractGraph.SimpleVertex- Parameters:
id- identifier of vertex
-
setProperty
public void setProperty(String name, Object value)
Adds a local property to this element.- Specified by:
setPropertyin interfaceGraph.Vertex<ID>- Overrides:
setPropertyin classAbstractGraph.SimpleVertex- Parameters:
name- of propertyvalue- of property
-
removeProperty
public Graph.Vertex<ID> removeProperty(String name)
Removes local property- Specified by:
removePropertyin interfaceGraph.Vertex<ID>- Overrides:
removePropertyin 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 unmodifiableMapof 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
-
-