public void insertReverseSorted(final int idx,final double distance){
  int i=0;
  for (  ListNode temp : m_List) {
    if (temp.distance < distance) {
      break;
    }
    i++;
  }
  m_List.add(i,new ListNode(idx,distance));
}

public void insertReverseSorted ( final int idx , final double distance ) { int i = 0 ; for ( ListNode temp : m_List ) { if ( temp . distance < distance ) { break ; } i ++ ; } m_List . add ( i , new ListNode ( idx , distance ) ) ; }
inserts an element in reverse sorted order in the list .
