PrimitiveIterator.OfInt remoteIterator() { // TODO: need to add in way to not box these later // Since this is a remote iterator we have to add it to the remote intermediate operations queue intermediateOperations.add(BoxedIntOperation.getInstance()); DistributedCacheStream<Integer> stream = new DistributedCacheStream<>(this); Iterator<Integer> iterator = stream.remoteIterator(); return new IntegerIteratorToPrimitiveInteger(iterator); }
@Override public Stream<Integer> boxed() { return addIntermediateOperationMap(BoxedIntOperation.getInstance(), cacheStream()); }