Review Request : 7029997 : Restyling of SortedMap Javadoc

Joe Darcy joe.darcy at oracle.com
Wed Mar 23 01:27:10 UTC 2011


On 3/22/2011 4:33 PM, Mike Duigou wrote:

[snip]

>> 2) "Though nothing enforces this recommendation as interfaces cannot
>>     declare constructors". I'd tend to move this statement to before
>>     the list, and maybe put it in parantheses after constructors.
>>     Also my personal preference is to stay with "there is no way to"
>>     rather than "nothing". That would look like:
>>
>>     <p>All general-purpose sorted map implementation classes should
>>     provide four "standard" constructors (though there is no way to
>>     enforce this ...):
>>
>> This is just my personal preference. I'm ok with your changes as is.
> How about this version :
>
>   *<p>All general-purpose sorted map implementation classes should provide four
>   * "standard" constructors. It is not possible to enforce this recommendation
>   * though as required constructors cannot be specified by interfaces. The
>   * expected "standard" constructors for all sorted map implementations are:
>   *<ol>
>

FWIW, while the requirement for a particular suite of constructors isn't 
enforceable via the type system, it is the sort of extra-linguistic 
check that could be written as a annotation processor and provided 
during a compile to enforce the constraint.

-Joe



More information about the core-libs-dev mailing list