Initial support for int streams

Paul Sandoz paul.sandoz at oracle.com
Thu Nov 15 02:44:07 PST 2012


Hi,

Initial support for int streams has been pushed to the code repo.

It's a little rough'n'ready, the initial goal was to get something working for pull/push/sequential/parallel without boxing.

There has not been much attempt to consolidate functionality between reference and int streams (beyond that of the core and test framework). Nor has there been much attempt to find the right locations for various pieces of functionality e.g. Arrays.stream(int[] ).

We can now stand back a little and see what can be shared and what should go where, such as:

- it looks possible to share much of the the work that Brian recently did for parallel tasks with FindAny/FirstFirst/Match*/Splice for reference streams. 

- we can add a method Random.intStream() to return an infinite stream of randomly generated integers.

For the curious some simple test examples can be found here:

http://hg.openjdk.java.net/lambda/lambda/jdk/raw-file/tip/test-ng/tests/org/openjdk/tests/java/util/streams/ops/PrimitiveOpsTests.java

Paul.



More information about the lambda-dev mailing list