@ Override public int compare ( HashMap m1 , HashMap m2 ) { double val1 ; double val2 ; for ( String sortId : sortIds ) { val1 = getValue ( m1 , sortId ) ; val2 = getValue ( m2 , sortId ) ; if ( val1 > val2 ) { return decVal ; } else if ( val1 < val2 ) { return ascVal ; } } return 0 ; }
Compare two element in the array by using sorting IDs .