Java.Util.LinkedHashMap Class
LinkedHashMap is an implementation of Java.Util.IMap that guarantees iteration order.

See Also: LinkedHashMap Members

Syntax

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

Remarks

LinkedHashMap is an implementation of Java.Util.IMap that guarantees iteration order. All optional operations are supported.

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

Entries are kept in a doubly-linked list. The iteration order is, by default, the order in which keys were inserted. Reinserting an already-present key doesn't change the order. If the three argument constructor is used, and accessOrder is specified as true, the iteration will be in the order that entries were accessed. The access order is affected by put, get, and putAll operations, but not by operations on the collection views.

Note: the implementation of LinkedHashMap is not synchronized. If one thread of several threads accessing an instance modifies the map structurally, access to the map needs to be synchronized. For insertion-ordered instances a structural modification is an operation that removes or adds an entry. Access-ordered instances also are structurally modified by put, get, and putAll since these methods change the order of the entries. 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: Java.Util
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1