/** * Utility function to create a node lookup table for a given dependency graph. * * @param graph * The graph whose nodes shall be indexed * @return A map which associates the node's identifier (see {@link kieker.tools.trace.analysis.filter.visualization.graph.AbstractGraphElement#getIdentifier()}) * to the actual identifier * * @param <T> * The type of the entities within the dependency graph. */ public static <T extends ISystemModelElement> ConcurrentMap<String, DependencyGraphNode<T>> createNodeLookupTable(final AbstractDependencyGraph<T> graph) { final ConcurrentMap<String, DependencyGraphNode<T>> map = new ConcurrentHashMap<>(); for (final DependencyGraphNode<T> node : graph.getNodes()) { map.put(node.getIdentifier(), node); } return map; }