@Override public void put(K key, int value) { map.put(key, value); }
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { // VERSION in.readByte(); // NUMBER OF ENTRIES int size = in.readInt(); setUp(size); // ENTRIES while (size-- > 0) { K key = (K) in.readObject(); int val = in.readInt(); put(key, val); } } } // TObjectIntHashMap
/** * Copies all of the mappings from the specified map to this map These mappings will replace any * mappings that this map had for any of the keys currently in the specified map. * * @param map mappings to be stored in this map. * @throws NullPointerException if the specified map is null. */ public void putAll(TObjectIntHashMap<K> map) { for (TObjectIntIterator<K> it = map.iterator(); it.hasNext(); ) { put(it.key(), it.value()); } }