An implementation of the IMap interface that uses a hashtable for storing the keys/value pairs.
sealed class
|
Map
|
with
|
<TKey>
|
||
<TValue>
|
|||||
implements
|
IMap<TKey, TValue>
|
||||
extends
|
MapConstBase<TKey, TValue>
|
The number of elements in this collection.
public
override
property
|
Count
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of elements. | |
implements
|
BagConstBase.Count
|
Returns a read-only set of all keys in this dictionary.
public
override
property
|
Keys
{
get
}
|
||
type
|
IBagConst<TKey>
|
||
value
|
|
The set of keys. | |
implements
|
MapConstBase.Keys
|
Returns a read-only collection of all values in this dictionary.
public
override
property
|
Values
{
get
}
|
||
type
|
IBagConst<TValue>
|
||
value
|
|
The collection of values. | |
implements
|
MapConstBase.Values
|
Creates a new instance of Map.
public
constructor
|
Map
(EqualsDelegate<TKey> equals = null,
HashCodeDelegate<TKey> hashCode = null,
int32 initialCapacity = 12)
|
||
params
|
equals
|
Optional
equality
comparer.
Defaults
to
null . |
|
hashCode
|
Optional
hash
code
delegate.
Defaults
to
null . |
||
initialCapacity
|
[>=0]
|
The
initial
capacity
of
the
dictionary,
in
keys/value
pairs.
Defaults
to
12 .
|
Removes all key/value pairs from the map.
public
method
|
Clear
()
|
||
implements
|
IMap.Clear
|
Returns if this collection contains the given element.
[Pure]
|
||||
public
override
method
|
Contains
(MapEntry<TKey, TValue> element)
|
|||
type
|
bool
|
|||
params
|
element
|
The element. | ||
returns
|
true
if
element
is
contained
in
this
collection,
false
if
not.
|
|||
inherited
|
MapConstBase.Contains
|
Returns if this collection contains all given elements.
public
method
|
ContainsAll
(IEnumerable<T> elements)
|
||
type
|
bool
|
||
params
|
elements
|
[not-null]
|
The elements. |
returns
|
true
if
all
elements
are
contained
in
this
collection,
false
if
not.
|
||
inherited
|
BagConstBase.ContainsAll
|
Returns if this map contains an entry for the given key.
public
override
method
|
ContainsKey
(TKey key)
|
||
type
|
bool
|
||
params
|
key
|
The key. | |
returns
|
true
if
the
map
contains
an
entry
for
the
key,
false
if
it
does
not.
|
||
implements
|
MapConstBase.ContainsKey
|
public
method
|
EqualsEntry
(MapEntry<TKey, TValue> a,
MapEntry<TKey, TValue> b)
|
||
type
|
bool
|
||
params
|
a
|
||
b
|
|||
inherited
|
MapConstBase.EqualsEntry
|
Returns the first enumerated value.
[Pure]
|
||||
public
virtual
method
|
First
()
|
|||
type
|
T
|
|||
returns
|
The first enumerated value. | |||
inherited
|
BagConstBase.First
|
Exceptions:
Returns the value that is currently mapped to the given key.
public
override
method
|
Get
(TKey key,
TValue defaultValue = default(TValue))
|
||
type
|
TValue
|
||
params
|
key
|
The key. | |
defaultValue
|
The default value to return in case the map does not contain an entry for key. | ||
returns
|
The entry value. | ||
implements
|
MapConstBase.Get
|
public
override
method
|
GetEnumerator
()
|
||
type
|
IEnumerator<MapEntry<TKey, TValue>>
|
||
implements
|
EnumerableBase.GetEnumerator
|
Returns the last enumerated value.
[Pure]
|
||||
public
virtual
method
|
Last
()
|
|||
type
|
T
|
|||
returns
|
The last enumerated value. | |||
inherited
|
BagConstBase.Last
|
Exceptions:
Maps the given value to the specified key.
public
method
|
Put
(TKey key,
TValue value)
|
||
type
|
TValue
|
||
params
|
key
|
The key. | |
value
|
The value. | ||
returns
|
The previously mapped value. | ||
implements
|
IMap.Put
|
Removes the mapping for the given key.
public
method
|
Remove
(TKey key)
|
||
type
|
TValue
|
||
params
|
key
|
The key. | |
returns
|
The previously mapped value. | ||
implements
|
IMap.Remove
|
Returns the elements of this enumerable object as a fresh array.
[Pure]
|
||||
public
method
|
ToArray
()
|
|||
type
|
T[]
|
|||
returns
|
|
The array of elements. | ||
inherited
|
BagConstBase.ToArray
|
Returns the elements of this collection as an array.
public
override
method
|
ToArrayCopy
(MapEntry<TKey, TValue>[] array,
int32 offset = 0)
|
||
type
|
MapEntry<TKey, TValue>[]
|
||
params
|
array
|
[not-null]
|
The output array. |
offset
|
[>=0]
|
Offset
into
array.
Defaults
to
0 .
|
|
returns
|
|
The filled array. | |
implements
|
BagConstBase.ToArrayCopy
|
Remarks:
The elements in this collection will be copied into the given array, starting at the array index specified by offset.
Returns the elements of this enumerable object as a list.
[Pure]
|
||||
public
virtual
method
|
ToArrayList
()
|
|||
type
|
IArrayVector<T>
|
|||
returns
|
|
The list of elements. | ||
inherited
|
BagConstBase.ToArrayList
|
Returns the elements of this enumerable object as a list.
[Pure]
|
||||
public
virtual
method
|
ToList
()
|
|||
type
|
IVectorConst<T>
|
|||
returns
|
|
The list of elements. | ||
inherited
|
BagConstBase.ToList
|