On Mon, 9 Aug 2021 12:28:23 GMT, CC007 <github.com+5381337+cc...@openjdk.org> 
wrote:

> create Streamable and ParallelStreamable interface and use them in Collection 
> and Optional

> _Mailing list message from [Alan Snyder](mailto:javali...@cbfiddle.com) on 
> [core-libs-dev](mailto:core-libs-...@mail.openjdk.java.net):_
> 
> Ah, if only one could define a type alias Streamable<T> = 
> Supplier<Stream<T>>...

If you use that, you'd lose some semantics that the method name would have 
given you. I feel that @liach 's solution is cleaner, since that preserves this 
method name.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5050

Reply via email to