question: public int compareSwappedTo ( DoubleIntPair other ) { int fdiff = this . second - other . second ; if ( fdiff != 0 ) { return fdiff ; } return Double . compare ( this . second , other . second ) ; }
target:  Implementation of comparableSwapped interface, sorting by second then first.