net.sf.jga.fn.algorithm
Class FindIteratorFunctor<T>
java.lang.Object
net.sf.jga.fn.UnaryFunctor<java.util.Iterator<? extends T>,FindIterator<T>>
net.sf.jga.fn.algorithm.FindIteratorFunctor<T>
- All Implemented Interfaces:
- java.io.Serializable, Visitable
- Direct Known Subclasses:
- Find, FindElement
public abstract class FindIteratorFunctor<T>
- extends UnaryFunctor<java.util.Iterator<? extends T>,FindIterator<T>>
Abstract base class for functors that take an input iterator and return a
FindIterator. This class provides the ability to prevent excessive
iterator wrapping by tracking the identity of the functor that has produced
the wrapped iterator, and not re-wrapping an iterator if it was produced by
the same object that is currently requesting a wrapped iterator.
Copyright © 2004 David A. Hall
- Author:
- David A. Hall
- See Also:
- Serialized Form
|
Method Summary |
protected FindIterator<T> |
wrap(java.util.Iterator<? extends T> iterator)
Conditionally wraps the input iterator in a FindIterator for return. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FindIteratorFunctor
public FindIteratorFunctor()
wrap
protected FindIterator<T> wrap(java.util.Iterator<? extends T> iterator)
- Conditionally wraps the input iterator in a FindIterator for return.
Uses a Wrapper to determine if the input iterator is one that this
object has already built and returned: if so, then there is no need
to wrap it again.
Copyright © 2002-2005 David A. Hall. All Rights Reserved.