Android Guides | Samples

Android.Runtime.JavaDictionary Class

HashMap is an implementation of IMap.

See Also: JavaDictionary

Syntax

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

Remarks

HashMap is an implementation of 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 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

The members of Android.Runtime.JavaDictionary are listed below.

See Also: Object

Public Constructors

Constructs a new empty HashMap instance.
A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
CountInt32.
[read-only]
IsFixedSizeBoolean.
[read-only]
IsReadOnlyBoolean.
[read-only]
IsSynchronizedBoolean.
default property
Item(Object)Object.
[read-only]
KeysICollection.
[read-only]
SyncRootObject.
[read-only]
ValuesICollection.

Public Methods

Explicitly Implemented Interface Members