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 ; }
Compares the schemes of this URI and a given URI .