In article <gasmq6$81m$>,
Mark Space <> wrote:
> Lew wrote:
>
> > That would apply to AbstractSet. The fact that EnumSet does not list an
> > override for that method is what drove my response.
> >
> > Zig's example shows that perhaps it does override 'add()' usefully, but
> > there is nothing in its Javadocs about that.
>
> EnumSet is abstract as well.
Ah, I'd overlooked this. Thanks, both!
> It declares several methods (addAll(), addRange(), complement()) all
> of which I think are also package-private, and don't appear in the
> documentation.
>
> Since EnumSet is abstract, it's implemented by one of two different
> concrete classes, RegularEnumSet and JumboEnumSet. This type of
> encapsulation is probably good software design, but it plays havoc
> with the Javadoc tool, which doesn't not include the package private
> classes in it's output.
Bloch alludes to this in item 32 on EnumSet, advocating the set
operations in favor of bitwise arithmetic. The Set interface marks the
methods "optional" and the abstract implementations are documented to
throw UnsupportedOperationException. There's just no Javadoc for the
private, concrete implementation.
[...]
> I did find one site that lists the Java doc for this class:
>
> <http://www.docjar.com/docs/api/java/util/RegularEnumSet.html>
I like the source link generated by the doclet. Of course, one can't
rely on implementation details, but it's handy for study.
> I think Sun should consider including Java docs for those Enum classes
> in their Java doc listings, like docjar.com does.
I also wish there was some place to document the implicitly declared
static methods of Enum, other than the the JLS:
public static E[] values();
public static E valueOf(String name);
--
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews
|