Mercurial > hg > truffle
diff src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/LayoutGraph.java @ 4382:f22dc0a63f03
Removed old hierarchical layout manager; start removing cluster layout. apply diamond operator to whole source.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sat, 28 Jan 2012 00:16:17 +0100 |
parents | 53ddfe305645 |
children | 6a28db4be804 |
line wrap: on
line diff
--- a/src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/LayoutGraph.java Fri Jan 27 23:57:47 2012 +0100 +++ b/src/share/tools/IdealGraphVisualizer/Layout/src/com/sun/hotspot/igv/layout/LayoutGraph.java Sat Jan 28 00:16:17 2012 +0100 @@ -49,10 +49,10 @@ this.links = links; assert verify(); - vertices = new TreeSet<Vertex>(); - portLinks = new HashMap<Port, Set<Link>>(links.size()); - inputPorts = new HashMap<Vertex, Set<Port>>(links.size()); - outputPorts = new HashMap<Vertex, Set<Port>>(links.size()); + vertices = new TreeSet<>(); + portLinks = new HashMap<>(links.size()); + inputPorts = new HashMap<>(links.size()); + outputPorts = new HashMap<>(links.size()); for (Link l : links) { Port p = l.getFrom(); @@ -76,7 +76,7 @@ } if (!portLinks.containsKey(p)) { - HashSet<Link> hashSet = new HashSet<Link>(3); + HashSet<Link> hashSet = new HashSet<>(3); portLinks.put(p, hashSet); } @@ -152,7 +152,7 @@ // whole graph is visited. public Set<Vertex> findRootVertices(Set<Vertex> startingRoots) { - Set<Vertex> notRootSet = new HashSet<Vertex>(); + Set<Vertex> notRootSet = new HashSet<>(); for (Vertex v : startingRoots) { if (!notRootSet.contains(v)) { markNotRoot(notRootSet, v, v); @@ -174,7 +174,7 @@ } } - Set<Vertex> result = new HashSet<Vertex>(); + Set<Vertex> result = new HashSet<>(); for (Vertex v : tmpVertices) { if (!notRootSet.contains(v)) { result.add(v); @@ -190,7 +190,7 @@ public SortedSet<Cluster> getClusters() { - SortedSet<Cluster> clusters = new TreeSet<Cluster>(); + SortedSet<Cluster> clusters = new TreeSet<>(); for (Vertex v : getVertices()) { if (v.getCluster() != null) { clusters.add(v.getCluster());