com.mchange.v1.util
Class WrapperIterator

java.lang.Object
  extended by com.mchange.v1.util.WrapperIterator
All Implemented Interfaces:
Iterator

public abstract class WrapperIterator
extends Object
implements Iterator

This implementation does not yet support removes once hasNext() has been called... will add if necessary.


Field Summary
protected static Object SKIP_TOKEN
           
 
Constructor Summary
WrapperIterator(Iterator inner)
           
WrapperIterator(Iterator inner, boolean supports_remove)
           
 
Method Summary
 boolean hasNext()
           
 Object next()
           
 void remove()
           
protected abstract  Object transformObject(Object o)
          return SKIP_TOKEN to indicate an object should be skipped, i.e., not exposed as part of the iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SKIP_TOKEN

protected static final Object SKIP_TOKEN
Constructor Detail

WrapperIterator

public WrapperIterator(Iterator inner,
                       boolean supports_remove)

WrapperIterator

public WrapperIterator(Iterator inner)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator

transformObject

protected abstract Object transformObject(Object o)
return SKIP_TOKEN to indicate an object should be skipped, i.e., not exposed as part of the iterator. (we don't use null, because we want to support iterators over null-accepting Collections.)