/** * Create the junction that links the target node and the node when this action is executed. */ @Override public void execute(final Node<Double> targetNode) { if (targetNode instanceof CellNode) { ((CellNode) targetNode).addJunction(jun, getNode()); } else { throw new UnsupportedOperationException("Can't add Junction in a node that it's not a CellNode"); } }
/** * Create the junction that links the node where this action is executed and the target node. */ @Override public void execute(final Node<Double> targetNode) { if (targetNode instanceof CellNode) { getNode().addJunction(jun, (CellNode) targetNode); } else { throw new UnsupportedOperationException("Can't add Junction in a node that it's not a CellNode"); } }