org.apache.commons.collections.iterators
Class TransformIterator
- Iterator
public class TransformIterator
A Proxy
Iterator
which uses a
Transformer
instance to
transform the contents of the
Iterator
into some other form
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.
|
TransformIterator
public TransformIterator()
Constructs a new
TransformIterator
that will not function
until the
setIterator
method is
invoked.
TransformIterator
public TransformIterator(Iterator iterator)
Constructs a new TransformIterator
that won't transform
elements from the given iterator.
iterator
- the iterator to use
TransformIterator
public TransformIterator(Iterator iterator,
Transformer transformer)
Constructs a new 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
getTransformer
public Transformer getTransformer()
Getter for property transformer.
- Value of property transformer.
setTransformer
public void setTransformer(Transformer transformer)
Setter for property transformer.
transformer
- New value of property transformer.
transform
protected Object transform(Object source)
Transforms the given object using the transformer. If the
transformer is null, the original object is returned as-is.
source
- the object to transform
Copyright © 2001-2004 Apache Software Foundation. Documenation generated ${TODAY}.