Make BaseStream public?

Howard Lovatt howard.lovatt at gmail.com
Mon Jul 1 17:04:17 PDT 2013


+1


On 2 July 2013 06:39, Brian Goetz <brian.goetz at oracle.com> wrote:

> I am currently crawling through the docs getting ready for another pass on
> the specification.  The good news is that the class hierarchy has
> simplified a lot since the first pass.  The bad news is I am trying to tack
> a course between the twin evils of duplicated documentation and excessive
> linking (each level of linking loses some percentage of the readers.)
>
> The classes Stream, IntStream, LongStream, and DoubleStream all implement
> BaseStream, which describes behaviors common to all streams (closeability,
> iterator/spliterator, sequential/parallel, ordering). Currently BaseStream
> is package-private, but I am thinking that it might be valuable to elevate
> it to public, for possibly two reasons:
>
>  - Having a common supertype allows library code to abstract over all
> stream types.  Our tests use this ability, for example.
>
>  - Most of the documentation for the stream classes (sequential and
> parallel behavior, ordering, etc) is generic to all stream types, so
> putting it in one base class (where it can be @inheritDoc'ed or linked) is
> more natural than cutting and pasting it in N places, or dumping it all in
> the package doc.
>
>


-- 
  -- Howard.


More information about the lambda-libs-spec-observers mailing list