jtp.util
Class DevNullCollection
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractSet
|
+--jtp.util.DevNullCollection
- All Implemented Interfaces:
- Collection, Set
- public class DevNullCollection
- extends AbstractSet
a collection that is always empty; objects that are being added to it just get dropped.
instance
public static final DevNullCollection instance
iterator
public Iterator iterator()
- Specified by:
iterator
in interface Set
- Specified by:
iterator
in class AbstractCollection
size
public int size()
- Specified by:
size
in interface Set
- Specified by:
size
in class AbstractCollection
add
public boolean add(Object o)
- this version does nothing.
- Specified by:
add
in interface Set
- Overrides:
add
in class AbstractCollection