Interface COM.odi.odmg.List
- public interface List
- extends Collection
The List interface is a subinterface of the Collection
interface. The List interface encapsulates the operations on a list.
All methods throw the following exceptions:
COM.odi.odmg.TransactionNotInProgressException If there is no
transaction in progress.
COM.odi.ObjectStoreException If the current thread is not
associated with a transaction or if the instance in question is not
associated with the current thread.
Methods that modify persistent objects throw this exception:
COM.odi.odmg.DatabaseIsReadOnlyException If there is a readonly
transaction in progress or if the database is open for readonly.
- See Also:
- ListOfObject
-
add(int, Object)
- Equivalent to the ODMG method void insert_element_before().
-
append(List)
- Equivalent to the ODMG method void append().
-
concat(List)
- Equivalent to the ODMG method List concat().
-
get(int)
- Equivalent to the ODMG method any retrieve_element_at().
-
put(int, Object)
- Equivalent to the ODMG method void replace-element_at().
-
remove(int)
- Equivalent to the ODMG method void remove_element_at().
add
public abstract void add(int index,
Object obj) throws ArrayIndexOutOfBoundsException
- Equivalent to the ODMG method void insert_element_before().
- Parameters:
- index - The position at which to add the object.
- obj - The object to be added.
- Throws: ObjectNotExportedException
- If the list 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: ArrayIndexOutOfBoundsException
- If the index is out
of the bounds of this object.
put
public abstract void put(int index,
Object obj) throws ArrayIndexOutOfBoundsException
- Equivalent to the ODMG method void replace-element_at().
- Parameters:
- index - The position at which to put the object.
- obj - The object to be added.
- Throws: ObjectNotExportedException
- If the list 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: ArrayIndexOutOfBoundsException
- If the index is out
of the bounds of this object.
remove
public abstract Object remove(int index) throws ArrayIndexOutOfBoundsException
- Equivalent to the ODMG method void remove_element_at().
- Parameters:
- index - The position at which to remove the element.
- Returns:
- Returns the object that was successfully removed.
- Throws: ArrayIndexOutOfBoundsException
- If the index is out
of the bounds of this object.
get
public abstract Object get(int index) throws ArrayIndexOutOfBoundsException
- Equivalent to the ODMG method any retrieve_element_at().
- Parameters:
- index - The index of the object to be retrieved.
- Returns:
- Returns the object at the specified index.
- Throws: ArrayIndexOutOfBoundsException
- If the index is out
of the bounds of this object.
concat
public abstract List concat(List otherList)
- Equivalent to the ODMG method List concat().
- Parameters:
- otherList - The list with which to form a concatenation.
- Returns:
- Returns the concatenation of this list and otherList.
append
public abstract void append(List otherList)
- Equivalent to the ODMG method void append().
- Parameters:
- otherList - The list that you want to append to this list.
Copyright © 1996, 1997, 1998 Object Design, Inc. All rights reserved.