/** * Detach all links from the node and from the other connecting node, storing the connection * information in local data structures. */ private void detachLinks() { links = new ArrayList<OPPLink>(); linkSources = new HashMap<OPPLink, OPPNode>(); linkTargets = new HashMap<OPPLink, OPPNode>(); links.addAll(node.getIncomingLinks()); links.addAll(node.getOutgoingLinks()); for (OPPLink link : links) { linkSources.put(link, link.getSource()); linkTargets.put(link, link.getTarget()); link.setSource(null); link.setTarget(null); link.setOpd(null); } }