com.esri.arcgis.system
Interface IArray

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
Array, EnumGPEnvironment, EnumGPName, IArrayProxy

public interface IArray
extends java.io.Serializable

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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.


Method Summary
 void add(java.lang.Object unk)
          Adds an object to the array.
 int getCount()
          The element count of the array.
 java.lang.Object getElement(int index)
          Searches for the object in the array.
 void insert(int index, java.lang.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

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

Supported Platforms

Windows, Solaris, Linux

Description

Returns the number of elements in the array.

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

getElement

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

Supported Platforms

Windows, Solaris, Linux

Description

Returns the element at the specified index in 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.

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

add

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

Supported Platforms

Windows, Solaris, Linux

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.

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

insert

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

Supported Platforms

Windows, Solaris, Linux

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.

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

remove

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

Supported Platforms

Windows, Solaris, Linux

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.

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

removeAll

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

Supported Platforms

Windows, Solaris, Linux

Description

Removes all of the elements from the array.

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