|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.commons.iloader.node.collections.SingleCollection
public class SingleCollection
A 'collection' that only contains a single object. All of the methods in the class operate on the single object item.
Constructor Summary | |
---|---|
SingleCollection(java.lang.Object object)
Creates a new instance of this class. |
Method Summary | |
---|---|
boolean |
add(int index,
java.lang.Object object,
DataChangeNotifier dataChangeNotifier)
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 dataChangeNotifier)
Removes the child at the given index. |
boolean |
removeAll(DataChangeNotifier dataChangeNotifier)
Remove all children. |
boolean |
set(int index,
java.lang.Object object,
DataChangeNotifier dataChangeNotifier)
Sets the child at the given index. |
int |
size()
Returns the size of the collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleCollection(java.lang.Object object)
object
- the object to operate onMethod Detail |
---|
public int size()
IObjectCollection
size
in interface IObjectCollection
public java.lang.Object get(int index)
IObjectCollection
get
in interface IObjectCollection
public boolean add(int index, java.lang.Object object, DataChangeNotifier dataChangeNotifier)
IObjectCollection
add
in interface IObjectCollection
index
- index at which the item should be insertedobject
- the new child to insertdataChangeNotifier
- a listener that is to be notified of the change
public boolean set(int index, java.lang.Object object, DataChangeNotifier dataChangeNotifier)
IObjectCollection
set
in interface IObjectCollection
index
- index at which the item should be insertedobject
- the new child to insertdataChangeNotifier
- a listener that is to be notified of the change
public boolean remove(int index, DataChangeNotifier dataChangeNotifier)
IObjectCollection
remove
in interface IObjectCollection
index
- the index of the child to removedataChangeNotifier
- a listener that is to be notified of the change
public boolean removeAll(DataChangeNotifier dataChangeNotifier)
IObjectCollection
removeAll
in interface IObjectCollection
dataChangeNotifier
- a listener that is to be notified of the change
public java.lang.Object getParentObject()
IObjectCollection
getParentObject
in interface IObjectCollection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |