|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--org.apache.commons.collections.iterators.ProxyIterator
|
+--org.apache.commons.collections.iterators.TransformIterator
A Proxy Iterator which uses a Transformer instance to
transform the contents of the Iterator into some other form
| Constructor Summary | |
TransformIterator()
Constructs a new TransformIterator that will not function
until the setIterator method is
invoked. |
|
TransformIterator(Iterator iterator)
Constructs a new TransformIterator that won't transform
elements from the given iterator. |
|
TransformIterator(Iterator iterator,
Transformer transformer)
Constructs a new TransformIterator that will use the
given iterator and transformer. |
|
| Method Summary | |
Transformer |
getTransformer()
Getter for property transformer. |
Object |
next()
Returns the next element from the underlying iterator. |
void |
setTransformer(Transformer transformer)
Setter for property transformer. |
protected Object |
transform(Object source)
Transforms the given object using the transformer. |
| Methods inherited from class org.apache.commons.collections.iterators.ProxyIterator |
getIterator, hasNext, remove, setIterator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TransformIterator()
TransformIterator that will not function
until the setIterator method is
invoked.
public TransformIterator(Iterator iterator)
TransformIterator that won't transform
elements from the given iterator.
iterator - the iterator to use
public TransformIterator(Iterator iterator,
Transformer transformer)
TransformIterator that will use the
given iterator and transformer. If the given transformer is null,
then objects will not be transformed.
iterator - the iterator to usetransformer - the transformer to use| Method Detail |
public Transformer getTransformer()
public Object next()
ProxyIterator
next in interface Iteratornext in class ProxyIteratorpublic void setTransformer(Transformer transformer)
transformer - New value of property transformer.protected Object transform(Object source)
source - the object to transform
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||