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.
-
insertAfter(Object)
- Inserts the specified object into the list after the current position
of the cursor.
-
insertBefore(Object)
- Inserts the specified object into the list before the current position
of the cursor.
-
removeAt()
- Removes the object in the collection that the cursor is positioned
at.
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.
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.
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.