An indexed collection of elements. Provides basic functionality for retrieving elements at a specific position, searching for elements. Indexes are zero-based, such that the last element in the array is stored at the index length-1.
For an array which can be modified, see nsIMutableArray below.
Neither interface makes any attempt to protect the individual elements from modification. The convention is that the elements of the array should not be modified. Documentation within a specific interface should describe variations from this convention.
It is also convention that if an interface provides access to an nsIArray, that the array should not be QueryInterfaced to an nsIMutableArray for modification. If the interface in question had intended the array to be modified, it would have returned an nsIMutableArray!
null is a valid entry in the array, and as such any nsISupports parameters may be null, except where noted.
Public Member Functions
|unsigned long||indexOf (in unsigned long startIndex, in nsISupports element)|
|void||queryElementAt (in unsigned long index, in nsIIDRef uuid,[iid_is(uuid), retval] out nsQIResult result)|
|NS_IMETHOD_ (nsrefcnt) Release(void)=0|
|NS_IMETHOD_ (nsrefcnt) AddRef(void)=0|
|NS_IMETHOD||QueryInterface (REFNSIID aIID, void **aInstancePtr)=0|
|readonly attribute unsigned long||length|