public class Graph
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
Edge |
addEdge(Edge edge) |
Node |
addNode(Node node) |
boolean |
ancestor(Node child,
Node parent)
Checks whether there exists an ancestry relationship between two nodes
(unidirectional).
|
boolean |
equals(java.lang.Object obj) |
java.util.Set<Edge> |
getEdges() |
java.util.Set<Edge> |
getEdges(Node node)
Returns all edges in this graph for which the specified node is either
the source or the target node.
|
java.util.Set<Edge> |
getEdges(Node node,
boolean source,
boolean target)
Returns all edges in this graph for which the specified node is either
the source of the target node, depending on the specified flags.
|
java.util.UUID |
getId() |
java.lang.String |
getLabel() |
java.util.Set<Node> |
getNodes() |
org.eclipse.collections.impl.map.mutable.UnifiedMap<java.lang.String,java.lang.Object> |
getProperties() |
int |
hashCode() |
void |
setEdges(java.util.Set<Edge> edges) |
void |
setNodes(java.util.Set<Node> nodes) |
void |
setProperties(org.eclipse.collections.impl.map.mutable.UnifiedMap<java.lang.String,java.lang.Object> properties) |
public java.util.UUID getId()
public java.util.Set<Node> getNodes()
public void setNodes(java.util.Set<Node> nodes)
public java.util.Set<Edge> getEdges()
public void setEdges(java.util.Set<Edge> edges)
public org.eclipse.collections.impl.map.mutable.UnifiedMap<java.lang.String,java.lang.Object> getProperties()
public void setProperties(org.eclipse.collections.impl.map.mutable.UnifiedMap<java.lang.String,java.lang.Object> properties)
public java.lang.String getLabel()
public java.util.Set<Edge> getEdges(Node node, boolean source, boolean target)
node
- The node that should be part of the edge.source
- When set to true, edges in which the specified node is the
source node are included.target
- When set to true, edges in which the specified node is the
target node are included.public java.util.Set<Edge> getEdges(Node node)
node
- The node that should be part of the edge.public boolean ancestor(Node child, Node parent)
child
- The child node.parent
- The parent node.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object