[concurrency-interest] ParallelArray.binarySearch

Doug Lea dl at cs.oswego.edu
Sun Feb 3 09:13:04 EST 2008

Hanson Char wrote:
> Curious,
> 1) Why the implementation of the 2
> AbstractParallelAnyArray.binarySearch methods don't just simply invoke
> the corresponding static methods in Arrays.binarySearch, 

This is a transient fact. In some incarnations, the internal
representation hasn't been amenable to this, so it is easier
for now to keep local version until internals start freezing
(which probably won't be for a while).

> 2) Why the 2 binarySearch methods need to be redefined in
> ParallelArray, when they are already defined in the base class
> AbstractParallelAnyArray, and all ParrallelArray does is simply invoke
> the super.binarySearch ?

This meshes better with common java.util JDK conventions,
which is in turn a minor usability issue. For the top-level
ParallelArray class, you'd like the javadoc to include full
descriptions of all available methods without people needing
to know/care that some of them are inherited from some of the
boring With* classes (which are very likely to change anyway).

To add such javadoc, you need to attach it to a method, so
here, it is just attached to a call-super method.


More information about the Concurrency-interest mailing list