code: public void put(int key, boolean value) {
          int i = ContainerHelpers.binarySearch(mKeys, mSize, key);
          if (i >= 0) {
              mValues[i] = value;
          } else {
              i = ~i;
              mKeys = GrowingArrayUtils.insert(mKeys, mSize, i, key);
              mValues = GrowingArrayUtils.insert(mValues, mSize, i, value);
              mSize++;
          }
      }
docs: Adds a mapping from the specified key to the specified value,
  replacing the previous mapping from the specified key if there
  was one.