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>>

[not-null]
The key/value entries.

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.

Replace​All


public method ReplaceAll → (1)

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

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

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