现在看来,我们被困在供应商< Stream>,这肯定是不一样的.
Streamable发生了什么?
解决方法
Currently the only
implementor is Collection,and all of the other stream-bearing methods
are serving up specialized streams (chars(),codePoints(),lines(),etc)
with a method name that is more suitable than “stream”. So I think we
should drop Streamable and leave the stream() / parallel() methods on
Collection (or possibly move them up Iterable).
I’m starting to think that Streamable is not carrying its weight. I’d
like to consider dropping Streamable,at which point the base-most
implementation of parallel() is in Collection,and I’d also suggest we
consider renaming that to parallelStream().
this other post他补充说:
if everything that is Iterable is effectively Streamable (because Iterable has a stream()) method,and everything Streamable is effectively Iterable (because you can turn a Spliterator into an Iterator),aren’t they then the same abstraction?