com.annimon.stream.operator.DoubleMapToObj Maven / Gradle / Ivy
The newest version!
package com.annimon.stream.operator;
import com.annimon.stream.function.DoubleFunction;
import com.annimon.stream.iterator.LsaIterator;
import com.annimon.stream.iterator.PrimitiveIterator;
public class DoubleMapToObj extends LsaIterator {
private final PrimitiveIterator.OfDouble iterator;
private final DoubleFunction extends R> mapper;
public DoubleMapToObj(PrimitiveIterator.OfDouble iterator, DoubleFunction extends R> mapper) {
this.iterator = iterator;
this.mapper = mapper;
}
@Override
public boolean hasNext() {
return iterator.hasNext();
}
@Override
public R nextIteration() {
return mapper.apply(iterator.nextDouble());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy