if (!next.containsKey(fire))
if (!next.containsKey(Layout.getTile(fire)))
    private void generateSwitchCode(FlatNode fire, List dests)     {	//should only have one previous	HashMap prev = new HashMap();	HashMap next = new HashMap();	ListIterator destsIt = dests.listIterator();	while (destsIt.hasNext()) { 	    FlatNode dest = (FlatNode)destsIt.next(); 	    Coordinate[] hops =  		(Coordinate[])Router.getRoute(fire, dest).toArray(new Coordinate[0]);	    //add to fire's next	    if (!next.containsKey(fire)) 		next.put(Layout.getTile(fire), new HashSet());	    ((HashSet)next.get(Layout.getTile(fire))).add(hops[1]);	    //add to all other previous, next	    for (int i = 1; i < hops.length -1; i++) {		if (prev.containsKey(hops[i]))		    if (prev.get(hops[i]) != hops[i-1])			Utils.fail("More than one previous tile for a single data item");		prev.put(hops[i], hops[i-1]);		if (!next.containsKey(hops[i]))		    next.put(hops[i], new HashSet());		((HashSet)next.get(hops[i])).add(hops[i+1]);	    }	    //add the last step, plus the dest to the dest map	    if (prev.containsKey(hops[hops.length - 1]))		if (prev.get(hops[hops.length - 1]) != hops[hops.length - 2])		    Utils.fail("More than one previous tile for a single data item (2)");	    prev.put(hops[hops.length-1], hops[hops.length - 2]);	    if (!next.containsKey(hops[hops.length-1]))		next.put(hops[hops.length - 1], new HashSet());	    ((HashSet)next.get(hops[hops.length - 1])).add(hops[hops.length -1]);	}	asm(Layout.getTile(fire), prev, next);    }