com.annimon.stream.operator.IntMapToObj Maven / Gradle / Ivy
package com.annimon.stream.operator;
import com.landawn.abacus.util.function.IntFunction;
import com.annimon.stream.iterator.LsaIterator;
import com.annimon.stream.iterator.PrimitiveIterator;
public class IntMapToObj extends LsaIterator {
private final PrimitiveIterator.OfInt iterator;
private final IntFunction extends R> mapper;
public IntMapToObj(PrimitiveIterator.OfInt iterator, IntFunction extends R> mapper) {
this.iterator = iterator;
this.mapper = mapper;
}
@Override
public boolean hasNext() {
return iterator.hasNext();
}
@Override
public R nextIteration() {
return mapper.apply(iterator.nextInt());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy