public static Node getOtherNode(Edge edge, Node node) {

                for (Node n : edge.getAdjacent()) {

                        if (!n.equals(node)) {
                                return n;
                        }

                }
                return null;

        }