[concurrency-interest] ParallelArray.binarySearch

Hanson Char hanson.char at gmail.com
Sun Feb 3 13:17:28 EST 2008


> This is a transient fact.

How about the return value being different/inconsistent with that of
Arrays.binarySearch ?  Is that also transient ?

> 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

I see.  AFAIK, the javadoc generated for the subclass would
automatically/directly show the full text inherited from the base
class, if the javadoc is physically defined at the base class and is
left empty at the respective overriding method of the subclass.  One
advantage is that all overriding subclasses would get the default (yet
direct) javadoc free.

Another trivia - about 2 years ago, I proposed a JAXB fluent api using
the "with*" convention for method chaining:

  https://jaxb2-commons.dev.java.net/fluent-api

Now that I see such convention being extensively used in
ParrallelArray, I can't help thinking there is a causal relationship
:)

Regards,
Hanson


On Feb 3, 2008 6:13 AM, Doug Lea <dl at cs.oswego.edu> wrote:
> 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.
>
> -Doug


More information about the Concurrency-interest mailing list