Example usage for org.apache.commons.collections IteratorUtils transformedIterator

List of usage examples for org.apache.commons.collections IteratorUtils transformedIterator

Introduction

In this page you can find the example usage for org.apache.commons.collections IteratorUtils transformedIterator.

Prototype

public static Iterator transformedIterator(Iterator iterator, Transformer transform) 

Source Link

Document

Gets an iterator that transforms the elements of another iterator.

Usage

From source file:org.apache.cayenne.query.SQLTemplate.java

/**
 * Returns an iterator over parameter sets. Each element returned from the
 * iterator is a java.util.Map./*from ww w .j av  a  2s.co m*/
 */
@SuppressWarnings("unchecked")
public Iterator<Map<String, ?>> parametersIterator() {
    return (parameters == null || parameters.length == 0) ? IteratorUtils.emptyIterator()
            : IteratorUtils.transformedIterator(IteratorUtils.arrayIterator(parameters), nullMapTransformer);
}

From source file:org.objectstyle.cayenne.query.SQLTemplate.java

/**
 * Returns an iterator over parameter sets. Each element returned from the iterator is
 * a java.util.Map./* ww w .j av  a 2 s  .c  o m*/
 */
public Iterator parametersIterator() {
    return (parameters == null || parameters.length == 0) ? IteratorUtils.emptyIterator()
            : IteratorUtils.transformedIterator(IteratorUtils.arrayIterator(parameters), nullMapTransformer);
}