List of usage examples for java.util.stream StreamSupport intStream
public static IntStream intStream(Spliterator.OfInt spliterator, boolean parallel)
From source file:org.briljantframework.array.AbstractIntArray.java
@Override public IntStream stream() { PrimitiveIterator.OfInt ofInt = new PrimitiveIterator.OfInt() { private int current = 0; @Override//from w w w. j a v a 2 s .c o m public int nextInt() { return get(current++); } @Override public boolean hasNext() { return current < size(); } }; Spliterator.OfInt spliterator = Spliterators.spliterator(ofInt, size(), Spliterator.SIZED); return StreamSupport.intStream(spliterator, false); }