public void addNode(DACPNode n) { // Supports multiple nodes with the same tag ArrayList<DACPNode> l = this.nodes.get(n.getTag()); if (l == null) { l = new ArrayList<DACPNode>(); this.nodes.put(n.getTag(), l); } l.add(n); this.length++; }