@ Override public int compareTo ( Tag tag ) { int keyResult = this . key . compareTo ( tag . key ) ; if ( keyResult != 0 ) { return keyResult ; } return this . value . compareTo ( tag . value ) ; }
Compares this tag to the specified tag . The tag comparison is based on a comparison of key and value in that order .