code: private int compareScheme(URI other) {
      String scheme = getScheme();
      String otherScheme = other.getScheme();
  
      if (scheme == null && otherScheme == null) {
        return 0;
      }
      if (scheme != null) {
        if (otherScheme != null) {
          return scheme.compareToIgnoreCase(otherScheme);
        }
        // not null is greater than 'null'.
        return 1;
      }
      // 'null' is less than not null.
      return -1;
    }
docs: Compares the schemes of this URI and a given URI.
  
  @param other the other {@link URI} to compare the scheme
  @return a negative integer, zero, or a positive integer if this scheme is respectively less
  than, equal to, or greater than the full scheme of the other URI.