Fwd: RFR 8071597 Add Stream dropWhile and takeWhile operations

Stefan Zobel spliterator at gmail.com
Tue Jun 2 13:50:48 UTC 2015


Hi Paul,

Looks good.

I was wondering why the truncate method in Node.OfInt / OfLong / OfDouble
did not receive the same


+        if (to == count()) {
+            spliterator.forEachRemaining(nodeBuilder);
+        } else {
+            for (int i = 0; i < size &&
spliterator.tryAdvance(nodeBuilder); i++) { }
+        }


treatment as the truncate method in Node itself. Looks pretty symmetric to
my untrained eyes?


Thanks,
Stefan



More information about the core-libs-dev mailing list