hg: lambda/lambda/jdk: Add ParallelIterable interface; add partial implementation in ParallelIterables; ParallelIterable wrapper for arrays Arrays.parallel(array); utility combinators for Comparators; partial test case for ParallelIterable
Brian Goetz
brian.goetz at oracle.com
Mon Oct 17 12:34:21 PDT 2011
Good catch, thanks. Though a better approach would probably be to fail
fast in the constructor if the end index is inconsistent with the array
length.
Just to be clear, at this point this work is a total out-of-a-hat
exploration, to see if the approach works. The code quality is entirely
amateurish, intentionally; if the API approach doesn't work, there's no
point in wasting time making the implementation better.
On 10/17/2011 3:29 PM, Paul Benedict wrote:
> Brian,
>
> I believe ArrrayIterator.next() needs to catch IIOBE and translate it
> to NoSuchElementException because that's the documented exception of
> next()
>
> Paul
>
> On Mon, Oct 17, 2011 at 2:22 PM,<brian.goetz at oracle.com> wrote:
>> Changeset: db1dfef09cce
>> Author: briangoetz
>> Date: 2011-10-17 15:21 -0400
>> URL: http://hg.openjdk.java.net/lambda/lambda/jdk/rev/db1dfef09cce
>>
>> Add ParallelIterable interface; add partial implementation in ParallelIterables; ParallelIterable wrapper for arrays Arrays.parallel(array); utility combinators for Comparators; partial test case for ParallelIterable
>>
>> ! make/java/java/FILES_java.gmk
>> ! src/share/classes/java/util/Arrays.java
>> ! src/share/classes/java/util/Comparator.java
>> ! src/share/classes/java/util/Comparators.java
>> ! src/share/classes/java/util/Iterables.java
>> + src/share/classes/java/util/ParallelIterable.java
>> + src/share/classes/java/util/ParallelIterables.java
>> + src/share/classes/java/util/Splittable.java
>> ! test-ng/tests/java/util/IterableTest.java
>> ! test-ng/tests/java/util/LambdaTestHelpers.java
>> + test-ng/tests/java/util/ParallelIterableTest.java
>>
>>
>>
More information about the lambda-dev
mailing list