public V removeAt(int index){
  final Object old=mArray[(index << 1) + 1];
  if (mSize <= 1) {
    if (DEBUG)     Log.d(TAG,"remove: shrink from " + mHashes.length + " to 0");
    freeArrays(mHashes,mArray,mSize);
    mHashes=ContainerHelpers.EMPTY_INTS;
    mArray=ContainerHelpers.EMPTY_OBJECTS;
    mSize=0;
  }
 else {
    if (mHashes.length > (BASE_SIZE * 2) && mSize < mHashes.length / 3) {
      final int n=mSize > (BASE_SIZE * 2) ? (mSize + (mSize >> 1)) : (BASE_SIZE * 2);
      if (DEBUG)       Log.d(TAG,"remove: shrink from " + mHashes.length + " to "+ n);
      final int[] ohashes=mHashes;
      final Object[] oarray=mArray;
      allocArrays(n);
      mSize--;
      if (index > 0) {
        if (DEBUG)         Log.d(TAG,"remove: copy from 0-" + index + " to 0");
        System.arraycopy(ohashes,0,mHashes,0,index);
        System.arraycopy(oarray,0,mArray,0,index << 1);
      }
      if (index < mSize) {
        if (DEBUG)         Log.d(TAG,"remove: copy from " + (index + 1) + "-"+ mSize+ " to "+ index);
        System.arraycopy(ohashes,index + 1,mHashes,index,mSize - index);
        System.arraycopy(oarray,(index + 1) << 1,mArray,index << 1,(mSize - index) << 1);
      }
    }
 else {
      mSize--;
      if (index < mSize) {
        if (DEBUG)         Log.d(TAG,"remove: move " + (index + 1) + "-"+ mSize+ " to "+ index);
        System.arraycopy(mHashes,index + 1,mHashes,index,mSize - index);
        System.arraycopy(mArray,(index + 1) << 1,mArray,index << 1,(mSize - index) << 1);
      }
      mArray[mSize << 1]=null;
      mArray[(mSize << 1) + 1]=null;
    }
  }
  return (V)old;
}

public V removeAt ( int index ) { final Object old = mArray [ ( index << 1 ) + 1 ] ; if ( mSize <= 1 ) { if ( DEBUG ) Log . d ( TAG , "remove: shrink from " + mHashes . length + " to 0" ) ; freeArrays ( mHashes , mArray , mSize ) ; mHashes = ContainerHelpers . EMPTY_INTS ; mArray = ContainerHelpers . EMPTY_OBJECTS ; mSize = 0 ; } else { if ( mHashes . length > ( BASE_SIZE * 2 ) && mSize < mHashes . length / 3 ) { final int n = mSize > ( BASE_SIZE * 2 ) ? ( mSize + ( mSize > > 1 ) ) : ( BASE_SIZE * 2 ) ; if ( DEBUG ) Log . d ( TAG , "remove: shrink from " + mHashes . length + " to " + n ) ; final int [ ] ohashes = mHashes ; final Object [ ] oarray = mArray ; allocArrays ( n ) ; mSize -- ; if ( index > 0 ) { if ( DEBUG ) Log . d ( TAG , "remove: copy from 0-" + index + " to 0" ) ; System . arraycopy ( ohashes , 0 , mHashes , 0 , index ) ; System . arraycopy ( oarray , 0 , mArray , 0 , index << 1 ) ; } if ( index < mSize ) { if ( DEBUG ) Log . d ( TAG , "remove: copy from " + ( index + 1 ) + "-" + mSize + " to " + index ) ; System . arraycopy ( ohashes , index + 1 , mHashes , index , mSize - index ) ; System . arraycopy ( oarray , ( index + 1 ) << 1 , mArray , index << 1 , ( mSize - index ) << 1 ) ; } } else { mSize -- ; if ( index < mSize ) { if ( DEBUG ) Log . d ( TAG , "remove: move " + ( index + 1 ) + "-" + mSize + " to " + index ) ; System . arraycopy ( mHashes , index + 1 , mHashes , index , mSize - index ) ; System . arraycopy ( mArray , ( index + 1 ) << 1 , mArray , index << 1 , ( mSize - index ) << 1 ) ; } mArray [ mSize << 1 ] = null ; mArray [ ( mSize << 1 ) + 1 ] = null ; } } return ( V ) old ; }
remove the key / value mapping at the given index .
