com.esri.arcgis.networkanalyst
Interface INamedSet

All Superinterfaces:
Serializable
All Known Implementing Classes:
NamedSet

public interface INamedSet
extends Serializable

Provides access to a collection of named items.

Remarks

The INamedSet interface provides methods to Add, Remove, and retrieve objects in a NamedSet.

You can retrieve an object stored in a NamedSet by calling Item and passing in an index from 0 to Count - 1 or you can retrieve an object by calling ItemByName.

Product Availability

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


Method Summary
 void add(String name, Object element)
          Add a new named item to the collection.
 int getCount()
          The number of items in the collection.
 Object getItem(int index)
          The item at a given index.
 Object getItemByName(String name)
          The item corresponding to a given name.
 String getName(int index)
          The name of the item at a given index.
 void remove(Object element)
          Remove an item from the collection by reference.
 void removeAll()
          Empty the collection and remove all items.
 

Method Detail

getCount

int getCount()
             throws IOException,
                    AutomationException
The number of items in the collection.

Remarks

Returns the number of objects in the NamedSet.

Product Availability

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

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

getName

String getName(int index)
               throws IOException,
                      AutomationException
The name of the item at a given index.

Product Availability

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

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

getItem

Object getItem(int index)
               throws IOException,
                      AutomationException
The item at a given index.

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.

getItemByName

Object getItemByName(String name)
                     throws IOException,
                            AutomationException
The item corresponding to a given name.

Product Availability

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

Parameters:
name - The name (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(String name,
         Object element)
         throws IOException,
                AutomationException
Add a new named item to the collection.

Remarks

Adds an object to the NamedSet identified by the specified name.

Product Availability

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

Parameters:
name - The name (in)
element - 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(Object element)
            throws IOException,
                   AutomationException
Remove an item from the collection by reference.

Remarks

Removes an object from the NamedSet.

Product Availability

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

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

removeAll

void removeAll()
               throws IOException,
                      AutomationException
Empty the collection and remove all items.

Remarks

Removes all of the objects from the NamedSet.

Product Availability

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

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