IMapConst

Description

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

Derived from

ISetConst<MapEntry<TKey, TValue>>

Extended by

IMap
ISortedMapConst
MapConstBase abstract

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

Public / Methods

Contains​Key


[Pure]
public method ContainsKey → (1)

key in : TKey

The key.

returns → bool

true if the map contains an entry for the key, false if it does not.

Returns if this map contains an entry for the given key.

Get


[Pure]
public method Get → (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 entry value.

Returns the value that is currently mapped to the given key.

Public / Attributes

Keys


public attribute Keys → (get)

value : ISetConst<TKey>

[not-null]
The set of keys.

Returns a read-only set of all keys in this dictionary.

Method​Comparison​Key


[Constant]
public attribute MethodComparisonKey → (get)

value : CompareDelegate<TKey>

The comparison order for keys that is used by this map or null iff MethodEqualityKey is not null.

Returns the method that imposes a total order on the set of possible map keys.

Implementations are not required to actually use the exact same delegate returned by this property. The delegate is only required to be consistent with the comparison order used by the implementation.

Method​Equality​Key


[Constant]
public attribute MethodEqualityKey → (get)

value : EqualsDelegate<TKey>

The equality predicate for keys that is used by this map or null iff MethodComparisonKey is not null.

Returns the method for determining whether two keys are equal.

Implementations are not required to actually use the exact same delegate returned by this property. The delegate is only required to be consistent with the equality predicate used by the implementation.

Method​Hash​Code​Key


[Constant]
public attribute MethodHashCodeKey → (get)

value : HashCodeDelegate<TKey>

The hashing method for keys that is used by this map or null iff this map does not use key hashes.

Returns the method for computing hashes for map keys.

Implementations are not required to actually use the exact same delegate returned by this property. The delegate is only required to be consistent with the hashing method used by the implementation.

Values


public attribute Values → (get)

value : IBagConst<TValue>

[not-null]
The collection of values.

Returns a read-only collection of all values in this dictionary.