public int compareTo ( Object obj ) { LdapRdnComponent that = ( LdapRdnComponent ) obj ; // It's safe to compare directly against key and value, // because they are validated not to be null on instance creation. int keyCompare = this . key . toLowerCase ( ) . compareTo ( that . key . toLowerCase ( ) ) ; if ( keyCompare == 0 ) { return this . value . toLowerCase ( ) . compareTo ( that . value . toLowerCase ( ) ) ; } else { return keyCompare ; } }
Compare this instance to the supplied object .