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

class TreeMap in Tinman.Core.Collections

An implementation of the IMap interface that uses a balanced binary tree for storing the dictionary mappings.

sealed class TreeMap with <TKey>  
  <TValue>  
  implements ISortedMap<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

MaximumEntry

Returns the maximum entry of this dictionary.

public property MaximumEntry { get }
type MapEntry<TKey, TValue>
value The maximum entry.
implements ISortedMapConst.MaximumEntry

MaximumKey

Returns the maximum key of this dictionary.

public property MaximumKey { get }
type TKey
value The maximum key.
implements ISortedMapConst.MaximumKey

MinimumEntry

Returns the minimum entry of this dictionary.

public property MinimumEntry { get }
type MapEntry<TKey, TValue>
value The minimum entry.
implements ISortedMapConst.MinimumEntry

MinimumKey

Returns the minimum key of this dictionary.

public property MinimumKey { get }
type TKey
value The minimum key.
implements ISortedMapConst.MinimumKey

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

TreeMap

Creates a new instance of TreeMap.

public constructor TreeMap (CompareDelegate<TKey> compare, int32 initialCapacity = 12)
params compare [not-null] The comparison for keys.
  initialCapacity [>=0] The initial capacity of the dictionary, in mapped values. 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

RemoveMaximumEntry

Removes the maximum entry from this dictionary.

public method RemoveMaximumEntry ()
type MapEntry<TKey, TValue>
returns The removed entry.
implements ISortedMap.RemoveMaximumEntry

RemoveMaximumKey

Removes the maximum key from this dictionary.

public method RemoveMaximumKey ()
type TKey
returns The removed key.
implements ISortedMap.RemoveMaximumKey

RemoveMinimumEntry

Removes the minimum entry from this dictionary..

public method RemoveMinimumEntry ()
type MapEntry<TKey, TValue>
returns The removed entry.
implements ISortedMap.RemoveMinimumEntry

RemoveMinimumKey

Removes the minimum key from this dictionary..

public method RemoveMinimumKey ()
type TKey
returns The removed key.
implements ISortedMap.RemoveMinimumKey

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