java.lang.Object
kieker.analysis.generic.graph.impl.GraphImpl<N,E>
- Type Parameters:
N
- node type
E
- edge type
- All Implemented Interfaces:
IGraph<N,E>
public class GraphImpl<N extends INode,E extends IEdge>
extends java.lang.Object
implements IGraph<N,E>
Graph with label.
- Since:
- 2.0.0
- Author:
- Reiner Jung
-
Constructor Summary
Constructors
Constructor |
Description |
GraphImpl(java.lang.String label,
com.google.common.graph.MutableNetwork<N,E> graph) |
|
-
Method Summary
Modifier and Type |
Method |
Description |
java.util.Optional<E> |
findEdge(java.lang.String id) |
Find an edge by its id.
|
java.util.Optional<N> |
findNode(java.lang.String id) |
Find a node by its id.
|
com.google.common.graph.MutableNetwork<N,E> |
getGraph() |
Get the underlying google graph (network).
|
java.lang.String |
getLabel() |
|
void |
setLabel(java.lang.String label) |
Set the graph label.
|
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
public GraphImpl(
java.lang.String label,
com.google.common.graph.MutableNetwork<N,E> graph)
-
Method Details
-
public com.google.common.graph.MutableNetwork<N,E> getGraph()
Description copied from interface: IGraph
Get the underlying google graph (network).
- Specified by:
getGraph
in interface IGraph<N extends INode,E extends IEdge>
- Returns:
- return the graph
-
public java.lang.String getLabel()
- Specified by:
getLabel
in interface IGraph<N extends INode,E extends IEdge>
- Returns:
- returns the graph label
-
public void setLabel(java.lang.String label)
Description copied from interface: IGraph
Set the graph label.
- Specified by:
setLabel
in interface IGraph<N extends INode,E extends IEdge>
- Parameters:
label
- label of the graph
-
public java.util.Optional<N> findNode(
java.lang.String id)
Description copied from interface: IGraph
Find a node by its id.
- Specified by:
findNode
in interface IGraph<N extends INode,E extends IEdge>
- Parameters:
id
- id of the node
- Returns:
- returns an optional which may contain the node or nothing when no node with the given id exists
-
public java.util.Optional<E> findEdge(
java.lang.String id)
Description copied from interface: IGraph
Find an edge by its id.
- Specified by:
findEdge
in interface IGraph<N extends INode,E extends IEdge>
- Parameters:
id
- id of the edge
- Returns:
- returns an optional which may contain the edge or nothing when no edge with the given id exists