/** Returns the old value associated with the specified key, or null. */ public V put (K key, V value) { if (key == null) throw new IllegalArgumentException("key cannot be null."); return put_internal(key, value); }
/** Returns the old value associated with the specified key, or null. */ public V put (K key, V value) { if (key == null) throw new IllegalArgumentException("key cannot be null."); return put_internal(key, value); }
/** Returns the old value associated with the specified key, or null. */ public V put (K key, V value) { if (key == null) throw new IllegalArgumentException("key cannot be null."); return put_internal(key, value); }
/** Returns the old value associated with the specified key, or null. */ public V put (K key, V value) { if (key == null) throw new IllegalArgumentException("key cannot be null."); return put_internal(key, value); }
private void putStash (K key, V value) { if (stashSize == stashCapacity) { // Too many pushes occurred and the stash is full, increase the table size. resize(capacity << 1); put_internal(key, value); return; } // Store key in the stash. int index = capacity + stashSize; keyTable[index] = key; valueTable[index] = value; stashSize++; size++; }
private void putStash (K key, V value) { if (stashSize == stashCapacity) { // Too many pushes occurred and the stash is full, increase the table size. resize(capacity << 1); put_internal(key, value); return; } // Store key in the stash. int index = capacity + stashSize; keyTable[index] = key; valueTable[index] = value; stashSize++; size++; }
private void putStash (K key, V value) { if (stashSize == stashCapacity) { // Too many pushes occurred and the stash is full, increase the table size. resize(capacity << 1); put_internal(key, value); return; } // Store key in the stash. int index = capacity + stashSize; keyTable[index] = key; valueTable[index] = value; stashSize++; size++; }
private void putStash (K key, V value) { if (stashSize == stashCapacity) { // Too many pushes occurred and the stash is full, increase the table size. resize(capacity << 1); put_internal(key, value); return; } // Store key in the stash. int index = capacity + stashSize; keyTable[index] = key; valueTable[index] = value; stashSize++; size++; }