Encounter order
Mike Duigou
mike.duigou at oracle.com
Mon Oct 8 14:16:38 PDT 2012
On Oct 8 2012, at 03:45 , Paul Sandoz wrote:
> I am not sure of the intent of java.util.streams.Streams. Is this class intended for public or internal use? Methods such as the following exposed as part of the public API are asking for trouble:
>
> public static<T> Stream<T> stream(Collection<T> source, int flags) {
>
> public static<T> Stream<T> stream(Traversable<T> source, int sizeOrUnknown)
>
> public static<T> Stream<T> stream(Traversable<T> source, int sizeOrUnknown, int flags)
>
> Where as if they are just used internally to hide details of the Stream implementation then i think they are OK.
I am not sure they need to be public. These methods exist mostly for the other stream construction methods which take a more specific type to apply the flags appropriate for that type to the stream. Those other methods form the primary interface.
If we had modules it's possible that Streams would be module-private.
Mike
More information about the lambda-dev
mailing list