otherNode method
Implementation
Node<num> otherNode(Node<num> node) {
if (isIncident(node) && value != null) {
if (from == node) {
return to;
} else {
return from;
}
} else {
throw FormatException("incorect value");
}
}