Class AbstractEventGraph.EventEdge
- java.lang.Object
-
- com.github.moaxcp.graphs.AbstractGraph.SimpleEdge
-
- com.github.moaxcp.graphs.greenrobot.AbstractEventGraph.EventEdge
-
- All Implemented Interfaces:
Graph.Edge<ID>
- Enclosing class:
- AbstractEventGraph<ID>
public class AbstractEventGraph.EventEdge extends AbstractGraph.SimpleEdge
-
-
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.Edge<ID>
removeProperty(String name)
Removes local propertyvoid
setId(ID id)
Sets identifier of this edge.void
setProperty(String name, Object value)
Adds a local property to this element.-
Methods inherited from class com.github.moaxcp.graphs.AbstractGraph.SimpleEdge
endpoints, equals, from, from, fromVertex, getFrom, getId, getTo, hashCode, id, isDirected, setFrom, setTo, to, to, 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.Edge
getProperty, inherited, local, property
-
-
-
-
Method Detail
-
setId
public void setId(ID id)
Description copied from interface:Graph.Edge
Sets identifier of this edge.- Specified by:
setId
in interfaceGraph.Edge<ID>
- Overrides:
setId
in classAbstractGraph.SimpleEdge
- Parameters:
id
- of edge
-
setProperty
public void setProperty(String name, Object value)
Adds a local property to this element.- Specified by:
setProperty
in interfaceGraph.Edge<ID>
- Overrides:
setProperty
in classAbstractGraph.SimpleEdge
- Parameters:
name
- of propertyvalue
- of property
-
removeProperty
public Graph.Edge<ID> removeProperty(String name)
Removes local property- Specified by:
removeProperty
in interfaceGraph.Edge<ID>
- Overrides:
removeProperty
in classAbstractGraph.SimpleEdge
- 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
-
-