com.mchange.v1.util
Class WrapperUIterator
java.lang.Object
com.mchange.v1.util.WrapperUIterator
- All Implemented Interfaces:
- ClosableResource, UIterator
public abstract class WrapperUIterator
- extends Object
- implements UIterator
This implementation does not yet support removes once hasNext() has
been called... will add if necessary.
Method Summary |
void |
close()
forces the release of any resources that might be
associated with this object. |
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 |
SKIP_TOKEN
protected static final Object SKIP_TOKEN
WrapperUIterator
public WrapperUIterator(UIterator inner,
boolean supports_remove)
WrapperUIterator
public WrapperUIterator(UIterator inner)
hasNext
public boolean hasNext()
throws Exception
- Specified by:
hasNext
in interface UIterator
- Throws:
Exception
next
public Object next()
throws NoSuchElementException,
Exception
- Specified by:
next
in interface UIterator
- Throws:
NoSuchElementException
Exception
remove
public void remove()
throws Exception
- Specified by:
remove
in interface UIterator
- Throws:
Exception
close
public void close()
throws Exception
- Description copied from interface:
ClosableResource
- forces the release of any resources that might be
associated with this object.
- Specified by:
close
in interface ClosableResource
- Specified by:
close
in interface UIterator
- Throws:
Exception
transformObject
protected abstract Object transformObject(Object o)
throws Exception
- 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.)
- Throws:
Exception