com.ibm.commons.iloader.node
Interface IObjectCollection

All Known Implementing Classes:
EmptyCollection, SingleCollection

public interface IObjectCollection

An interface which is an integral part of the Data Node architecture. This interface represents the actual Data that the Data Node operates on.


Method Summary
 boolean add(int index, java.lang.Object object, DataChangeNotifier notifier)
          Adds a new child to the current collection.
 java.lang.Object get(int index)
          Returns the item at the given index in the collection.
 java.lang.Object getParentObject()
          Returns the parent of the collection.
 boolean remove(int index, DataChangeNotifier notifier)
          Removes the child at the given index.
 boolean removeAll(DataChangeNotifier notifier)
          Remove all children.
 boolean set(int index, java.lang.Object object, DataChangeNotifier notifier)
          Sets the child at the given index.
 int size()
          Returns the size of the collection.
 

Method Detail

size

int size()
Returns the size of the collection.

Returns:

get

java.lang.Object get(int index)
Returns the item at the given index in the collection.

Parameters:
index -
Returns:

add

boolean add(int index,
            java.lang.Object object,
            DataChangeNotifier notifier)
Adds a new child to the current collection.

Parameters:
index - index at which the item should be inserted
object - the new child to insert
notifier - a listener that is to be notified of the change
Returns:
returns true if the operation succeeded.

set

boolean set(int index,
            java.lang.Object object,
            DataChangeNotifier notifier)
Sets the child at the given index. The child which previously resided at the index is OVERWRITTEN!

Parameters:
index - index at which the item should be inserted
object - the new child to insert
notifier - a listener that is to be notified of the change
Returns:
returns true if the operation succeeded.

remove

boolean remove(int index,
               DataChangeNotifier notifier)
Removes the child at the given index.

Parameters:
index - the index of the child to remove
notifier - a listener that is to be notified of the change
Returns:
returns true if the operation succeeded.

removeAll

boolean removeAll(DataChangeNotifier notifier)
Remove all children.

Parameters:
notifier - a listener that is to be notified of the change
Returns:
returns true if the operation succeeded.

getParentObject

java.lang.Object getParentObject()
Returns the parent of the collection.

Returns:
the physical object that contains this collection