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