JTP API Documentation

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.


Field Summary
static DevNullCollection instance
           
 
Method Summary
 boolean add(Object o)
          this version does nothing.
 Iterator iterator()
           
 int size()
           
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray
 

Field Detail

instance

public static final DevNullCollection instance
Method Detail

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

JTP API Documentation