See Also: ArrayMap
public sealed class ArrayMap : Object, IMap, IDisposable
ArrayMap is a generic key->value mapping data structure that is designed to be more memory efficient than a traditional JavaDictionary. It keeps its mappings in an array data structure -- an integer array of hash codes for each item, and an Object array of the key/value pairs. This allows it to avoid having to create an extra object for every entry put in to the map, and it also tries to control the growth of the size of these arrays more aggressively (since growing them only requires copying the entries in the array, not rebuilding a hash map).
Note that this implementation is not intended to be appropriate for data structures that may contain large numbers of items. It is generally slower than a traditional HashMap, since lookups require a binary search and adds and removes require inserting and deleting entries in the array. For containers holding up to hundreds of items, the performance difference is not significant, less than 50%.
Because this container is intended to better balance memory use, unlike most other standard Java containers it will shrink its array as items are removed from it. Currently you have no control over this shrinking -- if you set a capacity and then remove an item, it may reduce the capacity to better match the current size. In the future an explicit call to set the capacity should turn off this aggressive shrinking behavior.
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
The members of Android.Util.ArrayMap are listed below.
See Also: Object
Make the array map empty.
Check whether a key exists in the array.
Check whether a value exists in the array.
Ensure the array map can hold at least minimumCapacity items.
Return a ISet for iterating over and interacting with all mappings in the array map.
Retrieve a value from the array.
Returns the index of a key in the set.
Return the key at the given index in the array.
Return a ISet for iterating over and interacting with all keys in the array map.
Remove an existing key from the array map.
Remove the key/value mapping at the given index.
Return the number of items in this array map.
Return the value at the given index in the array.
Return a JavaCollection for iterating over and interacting with all values in the array map.