private void cleanMapping(){
  ArrayList<Integer> toRemove=new ArrayList<Integer>();
  int size=mListMapping.size();
  for (int i=0; i < size; ++i) {
    if (mListMapping.keyAt(i) == mListMapping.valueAt(i)) {
      toRemove.add(mListMapping.keyAt(i));
    }
  }
  size=toRemove.size();
  for (int i=0; i < size; ++i) {
    mListMapping.delete(toRemove.get(i));
  }
}

private void cleanMapping ( ) { ArrayList < Integer > toRemove = new ArrayList < Integer > ( ) ; int size = mListMapping . size ( ) ; for ( int i = 0 ; i < size ; ++ i ) { if ( mListMapping . keyAt ( i ) == mListMapping . valueAt ( i ) ) { toRemove . add ( mListMapping . keyAt ( i ) ) ; } } size = toRemove . size ( ) ; for ( int i = 0 ; i < size ; ++ i ) { mListMapping . delete ( toRemove . get ( i ) ) ; } }
remove unnecessary mappings from sparse array .
