com.ibm.commons.iloader.node.collections
Class EmptyCollection

java.lang.Object
  extended by com.ibm.commons.iloader.node.collections.EmptyCollection
All Implemented Interfaces:
IObjectCollection

public class EmptyCollection
extends java.lang.Object
implements IObjectCollection

An empty collection. All of the methods in this class provide a default, skeleton implementation of the com.ibm.commons.iloader.node.IObjectCollection interface. As this class always provides a default implementation it can be accessed statically via com.ibm.commons.iloader.node.collections.EmptyCollection.getInstance().


Constructor Summary
EmptyCollection()
          Creates a new instance of this class.
 
Method Summary
 boolean add(int index, java.lang.Object object, DataChangeNotifier dataChangeNotifier)
          Returns false.
 java.lang.Object get(int index)
          Returns null.
static EmptyCollection getInstance()
          Returns an instance of this class.
 java.lang.Object getParentObject()
          Returns null.
 boolean remove(int index, DataChangeNotifier dataChangeNotifier)
          Returns false.
 boolean removeAll(DataChangeNotifier dataChangeNotifier)
          Returns false.
 boolean set(int index, java.lang.Object object, DataChangeNotifier dataChangeNotifier)
          Returns false.
 int size()
          Returns zero.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyCollection

public EmptyCollection()
Creates a new instance of this class.

Method Detail

getInstance

public static EmptyCollection getInstance()
Returns an instance of this class.

Returns:

size

public int size()
Returns zero.

Specified by:
size in interface IObjectCollection
Returns:

get

public java.lang.Object get(int index)
Returns null.

Specified by:
get in interface IObjectCollection
Returns:

add

public boolean add(int index,
                   java.lang.Object object,
                   DataChangeNotifier dataChangeNotifier)
Returns false.

Specified by:
add in interface IObjectCollection
Parameters:
index - index at which the item should be inserted
object - the new child to insert
dataChangeNotifier - a listener that is to be notified of the change
Returns:
returns true if the operation succeeded.

set

public boolean set(int index,
                   java.lang.Object object,
                   DataChangeNotifier dataChangeNotifier)
Returns false.

Specified by:
set in interface IObjectCollection
Parameters:
index - index at which the item should be inserted
object - the new child to insert
dataChangeNotifier - a listener that is to be notified of the change
Returns:
returns true if the operation succeeded.

remove

public boolean remove(int index,
                      DataChangeNotifier dataChangeNotifier)
Returns false.

Specified by:
remove in interface IObjectCollection
Parameters:
index - the index of the child to remove
dataChangeNotifier - a listener that is to be notified of the change
Returns:
returns true if the operation succeeded.

removeAll

public boolean removeAll(DataChangeNotifier dataChangeNotifier)
Returns false.

Specified by:
removeAll in interface IObjectCollection
Parameters:
dataChangeNotifier - a listener that is to be notified of the change
Returns:
returns true if the operation succeeded.

getParentObject

public java.lang.Object getParentObject()
Returns null.

Specified by:
getParentObject in interface IObjectCollection
Returns:
the physical object that contains this collection