docs: static int compareEndpoint(Endpoint left, Endpoint right) {
      if (left == null) { // nulls first
        return (right == null) ? 0 : -1;
      } else if (right == null) {
        return 1;
      }
      int byService = nullSafeCompareTo(left.serviceName(), right.serviceName(), false);
      if (byService != 0) return byService;
      int byIpV4 = nullSafeCompareTo(left.ipv4(), right.ipv4(), false);
      if (byIpV4 != 0) return byIpV4;
      return nullSafeCompareTo(left.ipv6(), right.ipv6(), false);
    }