public function getOtherCoordinate(CoordinateInterface $coordinate) {
        if ($coordinate->isEqual($this->from)) {
            return $this->to;
        } else if ($coordinate->isEqual($this->to)) {
            return $this->from;
        }
        return null;
    }