code: public final N adjacentNode(Object node) {
      if (node.equals(nodeU)) {
        return nodeV;
      } else if (node.equals(nodeV)) {
        return nodeU;
      } else {
        throw new IllegalArgumentException("EndpointPair " + this + " does not contain node " + node);
      }
    }
docs: Returns the node that is adjacent to {@code node} along the origin edge.
  
  @throws IllegalArgumentException if this {@link EndpointPair} does not contain {@code node}