Android Guides | Samples

Android.Runtime.JavaList Class

ArrayList is an implementation of IList, backed by an array.

See Also: JavaList

Syntax

[Android.Runtime.Register("java/util/ArrayList", DoNotGenerateAcw=true)]
public class JavaList : Object, IList

Remarks

ArrayList is an implementation of IList, backed by an array. All optional operations including adding, removing, and replacing elements are supported.

All elements are permitted, including null.

This class is a good choice as your default List implementation. Vector synchronizes all operations, but not necessarily in a way that's meaningful to your application: synchronizing each call to get, for example, is not equivalent to synchronizing the list and iterating over it (which is probably what you intended). CopyOnWriteArrayList is intended for the special case of very high concurrency, frequent traversals, and very rare mutations.

[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.JavaList are listed below.

See Also: Object

Public Constructors

Constructs a new ArrayList instance with zero initial capacity.
A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

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

Public Methods