org.simpleflatmapper.map.TransformEnumerable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-map Show documentation
Show all versions of sfm-map Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
package org.simpleflatmapper.map;
import org.simpleflatmapper.util.Enumerable;
import org.simpleflatmapper.util.Function;
public class TransformEnumerable implements Enumerable {
private final Enumerable delegate;
private final Function super I, ? extends O> transformer;
public TransformEnumerable(Enumerable delegate, Function super I, ? extends O> transformer) {
this.delegate = delegate;
this.transformer = transformer;
}
@Override
public boolean next() {
return delegate.next();
}
@Override
public O currentValue() {
return transformer.apply(delegate.currentValue());
}
@Override
public String toString() {
return "TransformEnumerable{" +
"delegate=" + delegate +
", transformer=" + transformer +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy