java.lang.Object | +--org.apache.commons.collections.iterators.TransformIteratorAll Implemented Interfaces:
Constructs a new TransformIterator that will not function until the #setIterator(Iterator) 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. |
Iterator | Gets the iterator this iterator is using. |
Gets the transformer this iterator is using. | |
boolean | hasNext() |
Object | next() Gets the next object from the iteration, transforming it using the current transformer. |
void | remove() |
void | setIterator(Iterator iterator) Sets the iterator for this iterator to use. |
void | setTransformer(Transformer transformer) Sets the transformer this the iterator to use. |
Object | transform(Object source) Transforms the given object using the transformer. |
public TransformIterator()
TransformIterator
that will not function
until the setIterator(Iterator) setIterator method is
invoked.
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.
public TransformIterator(Iterator iterator)
TransformIterator
that won't transform
elements from the given iterator.
public Iterator getIterator()
public Transformer getTransformer()
public boolean hasNext()
public Object next()
- if there are no more elementspublic void remove()
public void setIterator(Iterator iterator)
public void setTransformer(Transformer transformer)
protected Object transform(Object source)