local.tomas.util.collections
Class FilteredIterator<T>
java.lang.Object
local.tomas.util.collections.FilteredIterator<T>
- Type Parameters:
T - type iterated over
- All Implemented Interfaces:
- Iterator<T>
public class FilteredIterator<T>
- extends Object
- implements Iterator<T>
Filtered iterator.
A filtered iterator iterates only over those elements of the base iterator
passing the filter.
- Author:
- tomas.teubner
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilteredIterator
public FilteredIterator(Iterator<T> iterator,
ObjectFilter filter)
- Construct filtered iterator.
- Parameters:
iterator - the base iteratorfilter - the filter
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<T>
next
public T next()
- Specified by:
next in interface Iterator<T>
remove
public void remove()
- Specified by:
remove in interface Iterator<T>
- Throws:
UnsupportedOperationException - when invoked
Copyright © 2005-2007 Tomas Teubner. All Rights Reserved.