
org.openclover.util.function.TransformingIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clover Show documentation
Show all versions of clover Show documentation
Clover is an award winning code coverage and testing tool for Java and Groovy.
It integrates easily with Maven, Ant, Grails, Eclipse and IntelliJ IDEA
as well as with continuous integration servers such as Bamboo, Jenkins or Hudson.
Note: before Clover 4.0 this artifact was named com.cenqua.clover:clover.
The newest version!
package org.openclover.util.function;
import java.util.Iterator;
public class TransformingIterator> implements Iterator {
private final Iterator sourceIterator;
private final F mapper;
public TransformingIterator(Iterator sourceIterator, F mapper) {
this.sourceIterator = sourceIterator;
this.mapper = mapper;
}
@Override
public boolean hasNext() {
return sourceIterator.hasNext();
}
@Override
public T next() {
return mapper.apply(sourceIterator.next());
}
@Override
public void remove() {
sourceIterator.remove();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy