com.esri.arcgis.system
Interface IArray

All Superinterfaces:
Serializable
All Known Implementing Classes:
Array, EnumGPEnvironment, EnumGPName, TxMaps

public interface IArray
extends Serializable

Provides access to members that control a simple array of objects.

Description

An Array object is used to hold an indexed collection of generic objects. The Array uses a zero-based index.

Remarks

When adding an object to an Array, you are merely adding a new reference to the object not copying it. The reference is released when the Array is destroyed or the object is removed.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 void add(Object unk)
          Adds an object to the array.
 int getCount()
          The element count of the array.
 Object getElement(int index)
          Searches for the object in the array.
 void insert(int index, Object unk)
          Adds an object to the array at the specified index.
 void remove(int index)
          Removes an object from the array.
 void removeAll()
          Removes all objects from the array.
 

Method Detail

getCount

int getCount()
             throws IOException,
                    AutomationException
The element count of the array.

Description

Returns the number of elements in the array.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getElement

Object getElement(int index)
                  throws IOException,
                         AutomationException
Searches for the object in the array.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
index - The index (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

add

void add(Object unk)
         throws IOException,
                AutomationException
Adds an object to the array.

Description

Adds the element to the end of the array.

Remarks

When adding an object to an Array, you are merely adding a new reference to the object not copying it. The reference is released when the Array is destroyed or the object is removed.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
unk - A reference to another Object (IUnknown) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

insert

void insert(int index,
            Object unk)
            throws IOException,
                   AutomationException
Adds an object to the array at the specified index.

Description

Adds the element to the array at the specified index. The element at the beginning or the array has an index of 0, and the element at the end of the array has in index of Count - 1.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
index - The index (in)
unk - A reference to another Object (IUnknown) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

remove

void remove(int index)
            throws IOException,
                   AutomationException
Removes an object from the array.

Description

Removes the element at the specified index from the array. The element at the beginning or the array has an index of 0, and the element at the end of the array has in index of Count - 1.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
index - The index (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeAll

void removeAll()
               throws IOException,
                      AutomationException
Removes all objects from the array.

Description

Removes all of the elements from the array.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.