Package gnu.trove.map

# Interface TMap<K,V>

All Superinterfaces:
  `Map<K,V>`

All Known Implementing Classes:
  `TCustomHashMap`, `THashMap`

public interface TMap<K,V> extends Map<K,V>
Interface extension to `Map` which adds Trove-specific features.

## Nested Class Summary

## Nested classes/interfaces inherited from interface java.util.Map

`Map.Entry<K,V>`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`forEachEntry(TObjectObjectProcedure<? super K,? super V> procedure)`
Executes `procedure` for each key/value entry in the map.
`boolean`
`forEachKey(TObjectProcedure<? super K> procedure)`
Executes `procedure` for each key in the map.
`boolean`
`forEachValue(TObjectProcedure<? super V> procedure)`
Executes `procedure` for each value in the map.
`V`
`putIfAbsent(K key, V value)`
Inserts a key/value pair into the map if the specified key is not already associated with a value.
`boolean`
`retainEntries(TObjectObjectProcedure<? super K,? super V> procedure)`
Retains only those entries in the map for which the procedure returns a true value.
`void`
`transformValues(TObjectFunction<V,V> function)`
Transform the values in this map using `function`.

### Methods inherited from interface java.util.Map

`clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, remove, remove, replace, replace, replaceAll, size, values`

## Method Details

### putIfAbsent

V putIfAbsent(K key, V value)
Inserts a key/value pair into the map if the specified key is not already associated with a value.

Specified by:
  `putIfAbsent` in interface `Map<K,V>`
Parameters:
  `key` - an `Object` value
  `value` - an `Object` value
Returns:
  the previous value associated with `key`, or `null` if none was found.

### forEachKey

boolean forEachKey(TObjectProcedure<? super K> procedure)
Executes `procedure` for each key in the map.

Parameters:
  `procedure` - a `TObjectProcedure` value
Returns:
  false if the loop over the keys terminated because the procedure returned false for some key.

### forEachValue

boolean forEachValue(TObjectProcedure<? super V> procedure)
Executes `procedure` for each value in the map.

Parameters:
  `procedure` - a `TObjectProcedure` value
Returns:
  false if the loop over the values terminated because the procedure returned false for some value.

### forEachEntry

boolean forEachEntry(TObjectObjectProcedure<? super K,? super V> procedure)
Executes `procedure` for each key/value entry in the map.

Parameters:
  `procedure` - a `TObjectObjectProcedure` value
Returns:
  false if the loop over the entries terminated because the procedure returned false for some entry.

### retainEntries

boolean retainEntries(TObjectObjectProcedure<? super K,? super V> procedure)
Retains only those entries in the map for which the procedure returns a true value.

Parameters:
  `procedure` - determines which entries to keep
Returns:
  true if the map was modified.

### transformValues

void transformValues(TObjectFunction<V,V> function)
Transform the values in this map using `function`.

Parameters:
  `function` - a `TObjectFunction` value