public void removeOutgoingConnection(String type, Connection connection) { super.removeOutgoingConnection(type, connection); CompositeNode.NodeAndType nodeAndType = internalGetLinkedOutgoingNode(type); if (nodeAndType != null) { for (Connection outConnection: nodeAndType.getNode().getOutgoingConnections(nodeAndType.getType())) { if (((CompositeNodeEnd) outConnection.getTo()).getOutNodeId() == connection.getTo().getId()) { Node compositeNodeEnd = outConnection.getTo(); ((ConnectionImpl) outConnection).terminate(); internalRemoveNode(compositeNodeEnd); return; } } throw new IllegalArgumentException( "Could not find internal outgoing connection for node"); } }
public void removeOutgoingConnection(String type, Connection connection) { super.removeOutgoingConnection(type, connection); CompositeNode.NodeAndType nodeAndType = internalGetLinkedOutgoingNode(type); if (nodeAndType != null) { for (Connection outConnection: nodeAndType.getNode().getOutgoingConnections(nodeAndType.getType())) { if (((CompositeNodeEnd) outConnection.getTo()).getOutNodeId() == connection.getTo().getId()) { Node compositeNodeEnd = outConnection.getTo(); ((ConnectionImpl) outConnection).terminate(); internalRemoveNode(compositeNodeEnd); return; } } throw new IllegalArgumentException( "Could not find internal outgoing connection for node"); } }