Interface COM.odi.coll.ListCursor

public interface ListCursor
extends Cursor
The ListCursor interface provides methods for iterating through the elements of a list, which is an ordered collection.


Method Index

 o insertAfter(Object)
Inserts the specified object into the list after the current position of the cursor.

 o insertBefore(Object)
Inserts the specified object into the list before the current position of the cursor.

 o removeAt()
Removes the object in the collection that the cursor is positioned at.

Methods

 o insertBefore
  public abstract void insertBefore(Object o)
Inserts the specified object into the list before the current position of the cursor.

Parameters:
object - The object to insert into the list.

Throws: IllegalArgumentException
If the object is null and the collection behavior does not specify ALLOW_NULLS.
Throws: ModifyTransientCollectionException
If the collection is transient.
Throws: ObjectNotExportedException
If the collection and the object being inserted are in different segments and the object is not exported.
Throws: ObjectNotPersistenceCapableException
If the object is not persistence-capable.
Throws: ObjectNotPersistentException
If the collection is transient.
 o insertAfter
  public abstract void insertAfter(Object o)
Inserts the specified object into the list after the current position of the cursor.

Parameters:
object - The object to insert into the list.

Throws: IllegalArgumentException
If the object is null and the collection behavior does not specify ALLOW_NULLS.
Throws: ModifyTransientCollectionException
If the collection is transient.
Throws: ObjectNotExportedException
If the collection and the object being inserted are in different segments and the object is not exported.
Throws: ObjectNotPersistenceCapableException
If the object is not persistence-capable.
Throws: ObjectNotPersistentException
If the collection is transient.
 o removeAt
  public abstract void removeAt()
Removes the object in the collection that the cursor is positioned at. After execution of this method, the cursor is invalid.

A cursor becomes "null" if it is positioned past the last element, or before the first element. A cursor becomes "invalid" if the element to which it points is deleted. A cursor cannot be both null and invalid.

Throws: InvalidCursorException
If the cursor is invalid.
Throws: ModifyTransientCollectionException
If the collection is transient.
Throws: NullCursorException
If the cursor is null.

Copyright © 1996, 1997, 1998 Object Design, Inc. All rights reserved.