public void undo() throws CannotUndoException {
Set<IBond> keys = changedBondOrders.keySet();
Iterator<IBond> it = keys.iterator();
while (it.hasNext()) {
IBond bond = (IBond) it.next();
IBond.Order[] bondOrders = (IBond.Order[]) changedBondOrders.get(bond);
bond.setOrder(bondOrders[1]);
chemModelRelay.updateAtom(bond.getAtom(0));
chemModelRelay.updateAtom(bond.getAtom(1));
}
Set<IBond> keysstereo = changedBondsStereo.keySet();
Iterator<IBond> itint = keysstereo.iterator();
while (itint.hasNext()) {
IBond bond = (IBond) itint.next();
IBond.Stereo[] bondOrders = changedBondsStereo.get(bond);
bond.setStereo(bondOrders[1]);
}
}