| 392 | } |
| 393 | |
| 394 | private void removeEdges(E op, |
| 395 | MultiMap<E, E> fromMap, |
| 396 | MultiMap<E, E> toMap) { |
| 397 | // Find all of the from edges, as I have to remove all the associated to |
| 398 | // edges. Need to make a copy so we can delete from the map without |
| 399 | // screwing up our iterator. |
| 400 | Collection<E> c = fromMap.get(op); |
| 401 | if (c == null) return; |
| 402 | |
| 403 | ArrayList<E> al = new ArrayList<E>(c); |
| 404 | Iterator<E> i = al.iterator(); |
| 405 | while (i.hasNext()) { |
| 406 | E to = i.next(); |
| 407 | toMap.remove(to, op); |
| 408 | fromMap.remove(op, to); |
| 409 | } |
| 410 | } |
| 411 | |
| 412 | private void checkInPlan(E op) throws PlanException { |
| 413 | if (mOps.get(op) == null) { |