TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Map in Tinman.Core.Collections

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>

Public / Attributes

Count

The number of elements in this collection.

public override property Count { get }
type int32
value [>=0] The number of elements.
implements BagConstBase.Count

Keys

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

public override property Keys { get }
type IBagConst<TKey>
value [not-null] The set of keys.
implements MapConstBase.Keys

Values

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

public override property Values { get }
type IBagConst<TValue>
value [not-null] The collection of values.
implements MapConstBase.Values

Public / Constructors

Map

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.

Public / Methods

Clear

Removes all key/value pairs from the map.

public method Clear ()
implements IMap.Clear

Contains

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

ContainsAll

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

ContainsKey

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

EqualsEntry

public method EqualsEntry (MapEntry<TKey, TValue> a, MapEntry<TKey, TValue> b)
type bool
params a
  b
inherited MapConstBase.EqualsEntry

First

Returns the first enumerated value.

[Pure]
public virtual method First ()
type T
returns The first enumerated value.
inherited BagConstBase.First

Exceptions:

Get

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

GetEnumerator

public override method GetEnumerator ()
type IEnumerator<MapEntry<TKey, TValue>>
implements EnumerableBase.GetEnumerator

Last

Returns the last enumerated value.

[Pure]
public virtual method Last ()
type T
returns The last enumerated value.
inherited BagConstBase.Last

Exceptions:

Put

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

Remove

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

ToArray

Returns the elements of this enumerable object as a fresh array.

[Pure]
public method ToArray ()
type T[]
returns [not-null] The array of elements.
inherited BagConstBase.ToArray

ToArrayCopy

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 [not-null] 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.

ToArrayList

Returns the elements of this enumerable object as a list.

[Pure]
public virtual method ToArrayList ()
type IArrayVector<T>
returns [not-null] The list of elements.
inherited BagConstBase.ToArrayList

ToList

Returns the elements of this enumerable object as a list.

[Pure]
public virtual method ToList ()
type IVectorConst<T>
returns [not-null] The list of elements.
inherited BagConstBase.ToList