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