org.apache.commons.collections

Class TransformIterator

Implemented Interfaces:
Iterator

public class TransformIterator
extends TransformIterator

A Proxy Iterator which uses a Transformer instance to transform the contents of the Iterator into some other form
Author:
James Strachan
Since:
1.0

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

Methods inherited from class org.apache.commons.collections.iterators.TransformIterator

getTransformer, next, setTransformer, transform

Methods inherited from class org.apache.commons.collections.iterators.ProxyIterator

getIterator, hasNext, next, remove, setIterator

Constructor Details

TransformIterator

public TransformIterator()

TransformIterator

public TransformIterator(Iterator iterator)
Constructs a new TransformIterator that won't transform elements from the given iterator.
Parameters:
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.
Parameters:
iterator - the iterator to use
transformer - the transformer to use

Copyright © 2001-2004 Apache Software Foundation. Documenation generated ${TODAY}.