com.esri.arcgis.system
Interface IVariantArray

All Superinterfaces:
Serializable
All Known Implementing Classes:
VarArray

public interface IVariantArray
extends Serializable

Provides access to members that control variant arrays.

Description

The IVariantArray interface provides methods and properties for inserting, removing and accessing elements in a VarArray via a zero-based index.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 void add(Object element)
          Add an element.
 int getCount()
          The element count.
 Object getElement(int index)
          An element in the array.
 void insert(int index, Object element)
          Add an element at the specified posiiton.
 void remove(int index)
          Removes element at the specified position.
 void removeAll()
          Removes all elements.
 void setElement(int index, Object element)
          An element in the array.
 

Method Detail

getCount

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

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
An element in the array.

Product Availability

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

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

setElement

void setElement(int index,
                Object element)
                throws IOException,
                       AutomationException
An element in the array.

Product Availability

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

Parameters:
index - The index (in)
element - A Variant (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 element at the specified position.

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 elements.

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.

add

void add(Object element)
         throws IOException,
                AutomationException
Add an element.

Description

Adds the element to the end of the array.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

insert

void insert(int index,
            Object element)
            throws IOException,
                   AutomationException
Add an element at the specified posiiton.

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)
element - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.