Android Guides | Samples

Android.Runtime.JavaCollection Class

Collection is the root of the collection hierarchy.

See Also: JavaCollection

Syntax

[Android.Runtime.Register("java/util/Collection", DoNotGenerateAcw=true)]
public class JavaCollection : Object, ICollection

Remarks

Collection is the root of the collection hierarchy. It defines operations on data collections and the behavior that they will have in all implementations of Collections. All direct or indirect implementations of Collection should implement at least two constructors. One with no parameters which creates an empty collection and one with a parameter of type Collection. This second constructor can be used to create a collection of different type as the initial collection but with the same elements. Implementations of Collection cannot be forced to implement these two constructors but at least all implementations under java.util do. Methods that change the content of a collection throw an UnsupportedOperationException if the underlying collection does not support that operation, though it's not mandatory to throw such an Exception in cases where the requested operation would not change the collection. In these cases it's up to the implementation whether it throws an UnsupportedOperationException or not. Methods marked with (optional) can throw an UnsupportedOperationException if the underlying collection doesn't support that method.

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

See Also: Object

Public Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
CountInt32.
[read-only]
IsSynchronizedBoolean.
[read-only]
SyncRootObject.

Public Methods