otherNode method

Node<num> otherNode(
  1. Node<num> node
)

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");
  }
}