public void add(Edge e) {
		String typename = e.getClass().getName();
		Stack<Edge> st = null;
		if(typename.equals(lastStackTypeName)) {
			st = lastStack;
		} else {
			st = stacks.get(typename);
		}
		if(st == null) {
			st = new Stack<Edge>();
			stacks.put(typename, st);
		}
		st.push(e);
	}