IMap

Description

interface Tinman.Core.Collections.IMap
<TKey>
<TValue>

Derived from

IMapConst<TKey, TValue>

Extended by

ISortedMap
MapBase abstract

Base interface for classes that represent a set of key/value pairs.

Public / Methods

Clear


public method Clear → ()

Removes all key/value pairs from the map.

Put

2 overloads


public method Put1 → (1)

entry in : MapEntry<TKey, TValue>

The key/value entry.

returns → TValue

The previously mapped value.

Maps the given value to the specified key.


public method Put2 → (3)

key in : TKey

The key.

value in : TValue

The value.

defaultValue opt : TValue = default(TValue)

The default value to return in case the map does not contain an entry for key in.

returns → TValue

The previously mapped value or defaultValue opt.

Maps the given value to the specified key.

Put​All


public method PutAll → (1)

entries in : IEnumerable<MapEntry<TKey, TValue>>

The key/value entries. If null, this map will not be modified.

Maps the given values to the specified keys.

Remove


public method Remove → (2)

key in : TKey

The key.

defaultValue opt : TValue = default(TValue)

The default value to return in case the map does not contain an entry for key in.

returns → TValue

The previously mapped value or defaultValue opt.

Removes the mapping for the given key.

Remove​All


public method RemoveAll → (1)

keys in : IEnumerable<TKey>

The keys to remove. If null, this map will not be modified.

Removes all key/value pairs in this map with the given keys.

Remove​Where


public method RemoveWhere → (1)

predicate in : PredicateDelegate<MapEntry<TKey, TValue>>

The predicate to use. If null, this map will not be modified.

Removes all key/value pairs from this map for which the given predicate evaluates to true.

Replace​All


public method ReplaceAll → (1)

entries in : IEnumerable<MapEntry<TKey, TValue>>

The key/value pairs to replace with. If null, this map will be cleared.

Replaces all key/value pairs in this map with the given ones.

Retain​All


public method RetainAll → (1)

keys in : IBagConst<TKey>

The keys to retain. If null, this map will be cleared.

Removes all key/value pairs from this map except the given keys.