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