drm.util
Class WriterSet

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractSet
              |
              +--drm.util.WriterSet
All Implemented Interfaces:
java.util.Collection, java.util.Set

public class WriterSet
extends java.util.AbstractSet

A set which is always empty and the add method simply writes its argument to a given Writer, together with the current time in ms. Useful for debugging.


Constructor Summary
WriterSet(java.io.Writer w)
           
 
Method Summary
 boolean add(java.lang.Object o)
          Only writes the argument to the writer, and returns false.
 java.util.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
 

Constructor Detail

WriterSet

public WriterSet(java.io.Writer w)
Parameters:
w - The writer to write to. It must be open, an this class only writes to it, does not close it.
Method Detail

iterator

public java.util.Iterator iterator()
Overrides:
iterator in class java.util.AbstractCollection

size

public int size()
Overrides:
size in class java.util.AbstractCollection

add

public boolean add(java.lang.Object o)
Only writes the argument to the writer, and returns false. Swallows exceptions, only writes a message to the stderr.
Overrides:
add in class java.util.AbstractCollection