< prev index next >

src/com/sun/javatest/util/HelpTree.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg

*** 166,186 **** public class Selection { private Selection(Node node) { this(node, null); } ! private Selection(Map map) { this(null, map); } ! private Selection(Node node, Map map) { this.node = node; this.map = map; } private Node node; ! private Map map; } /** * Create an empty HelpTree object. */ --- 166,186 ---- public class Selection { private Selection(Node node) { this(node, null); } ! private Selection(Map<Node, Selection> map) { this(null, map); } ! private Selection(Node node, Map<Node, Selection> map) { this.node = node; this.map = map; } private Node node; ! private Map<Node, Selection> map; } /** * Create an empty HelpTree object. */
*** 411,426 **** */ public Comparator<Node> getNodeComparator(){ return nodeComparator; } ! private void write(WrapWriter out, Map m) throws IOException { int margin = out.getLeftMargin(); ! for (Iterator iter = m.entrySet().iterator(); iter.hasNext(); ) { ! Map.Entry e = (Map.Entry) (iter.next()); ! Node node = (Node) (e.getKey()); ! Selection s = (Selection) (e.getValue()); if (s.map == null) write(out, node); else { writeHead(out, node); out.setLeftMargin(margin + nodeIndent); --- 411,426 ---- */ public Comparator<Node> getNodeComparator(){ return nodeComparator; } ! private void write(WrapWriter out, Map<Node, Selection> m) throws IOException { int margin = out.getLeftMargin(); ! for (Iterator<Map.Entry<Node, Selection>> iter = m.entrySet().iterator(); iter.hasNext(); ) { ! Map.Entry<Node, Selection> e = iter.next(); ! Node node = (e.getKey()); ! Selection s = (e.getValue()); if (s.map == null) write(out, node); else { writeHead(out, node); out.setLeftMargin(margin + nodeIndent);
< prev index next >