Android.Runtime.JavaDictionary Class
HashMap is an implementation of Java.Util.IMap.

See Also: JavaDictionary Members

Syntax

[Android.Runtime.Register("java/util/HashMap", DoNotGenerateAcw=true)]
public class JavaDictionary : Java.Lang.Object, IDictionary

Remarks

HashMap is an implementation of Java.Util.IMap. All optional operations are supported.

All elements are permitted as keys or values, including null.

Note that the iteration order for HashMap is non-deterministic. If you want deterministic iteration, use Java.Util.LinkedHashMap.

Note: the implementation of HashMap is not synchronized. If one thread of several threads accessing an instance modifies the map structurally, access to the map needs to be synchronized. A structural modification is an operation that adds or removes an entry. Changes in the value of an entry are not structural changes.

The Iterator created by calling the iterator method may throw a ConcurrentModificationException if the map is structurally changed while an iterator is used to iterate over the elements. Only the remove method that is provided by the iterator allows for removal of elements during iteration. It is not possible to guarantee that this mechanism works in all cases of unsynchronized concurrent modification. It should only be used for debugging purposes.

[Android Documentation]

Requirements

Namespace: Android.Runtime
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1