Class GraphImpl<N extends INode,E extends IEdge>

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 Object implements IGraph<N,E>
Graph with label.
Since:
2.0.0
Author:
Reiner Jung
  • Constructor Details

    • GraphImpl

      public GraphImpl(String label, com.google.common.graph.MutableNetwork<N,E> graph)
  • Method Details

    • getGraph

      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
    • getLabel

      public String getLabel()
      Specified by:
      getLabel in interface IGraph<N extends INode,E extends IEdge>
      Returns:
      returns the graph label
    • setLabel

      public void setLabel(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
    • findNode

      public Optional<N> findNode(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
    • findEdge

      public Optional<E> findEdge(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