@ Override public int compareTo ( TaskDetails otherTask ) { if ( otherTask == null ) { return - 1 ; } return new CompareToBuilder ( ) . append ( this . taskKey , otherTask . getTaskKey ( ) ) . toComparison ( ) ; }
Compares two TaskDetails objects on the basis of their TaskKey