
com.annimon.stream.operator.LongArray Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stream Show documentation
Show all versions of stream Show documentation
Enhancing Java 8 Streams
The newest version!
package com.annimon.stream.operator;
import com.annimon.stream.iterator.PrimitiveIterator;
public class LongArray extends PrimitiveIterator.OfLong {
private final long[] values;
private int index;
public LongArray(long[] values) {
this.values = values;
index = 0;
}
@Override
public long nextLong() {
return values[index++];
}
@Override
public boolean hasNext() {
return index < values.length;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy