PrimitiveIterator.OfLong 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(BoxedLongOperation.getInstance()); DistributedCacheStream<Long> stream = new DistributedCacheStream<>(this); Iterator<Long> iterator = stream.remoteIterator(); return new LongIteratorToPrimitiveLong(iterator); }
@Override public Stream<Long> boxed() { return addIntermediateOperationMap(BoxedLongOperation.getInstance(), cacheStream()); }