void put(int fieldNumber,FieldData data){
  int i=binarySearch(fieldNumber);
  if (i >= 0) {
    mData[i]=data;
  }
 else {
    i=~i;
    if (i < mSize && mData[i] == DELETED) {
      mFieldNumbers[i]=fieldNumber;
      mData[i]=data;
      return;
    }
    if (mGarbage && mSize >= mFieldNumbers.length) {
      gc();
      i=~binarySearch(fieldNumber);
    }
    if (mSize >= mFieldNumbers.length) {
      int n=idealIntArraySize(mSize + 1);
      int[] nkeys=new int[n];
      FieldData[] nvalues=new FieldData[n];
      System.arraycopy(mFieldNumbers,0,nkeys,0,mFieldNumbers.length);
      System.arraycopy(mData,0,nvalues,0,mData.length);
      mFieldNumbers=nkeys;
      mData=nvalues;
    }
    if (mSize - i != 0) {
      System.arraycopy(mFieldNumbers,i,mFieldNumbers,i + 1,mSize - i);
      System.arraycopy(mData,i,mData,i + 1,mSize - i);
    }
    mFieldNumbers[i]=fieldNumber;
    mData[i]=data;
    mSize++;
  }
}

void put ( int fieldNumber , FieldData data ) { int i = binarySearch ( fieldNumber ) ; if ( i >= 0 ) { mData [ i ] = data ; } else { i = ~ i ; if ( i < mSize && mData [ i ] == DELETED ) { mFieldNumbers [ i ] = fieldNumber ; mData [ i ] = data ; return ; } if ( mGarbage && mSize >= mFieldNumbers . length ) { gc ( ) ; i = ~ binarySearch ( fieldNumber ) ; } if ( mSize >= mFieldNumbers . length ) { int n = idealIntArraySize ( mSize + 1 ) ; int [ ] nkeys = new int [ n ] ; FieldData [ ] nvalues = new FieldData [ n ] ; System . arraycopy ( mFieldNumbers , 0 , nkeys , 0 , mFieldNumbers . length ) ; System . arraycopy ( mData , 0 , nvalues , 0 , mData . length ) ; mFieldNumbers = nkeys ; mData = nvalues ; } if ( mSize - i != 0 ) { System . arraycopy ( mFieldNumbers , i , mFieldNumbers , i + 1 , mSize - i ) ; System . arraycopy ( mData , i , mData , i + 1 , mSize - i ) ; } mFieldNumbers [ i ] = fieldNumber ; mData [ i ] = data ; mSize ++ ; } }
adds a mapping from the specified fieldnumber to the specified data , replacing the previous mapping if there was one .
