Location of getStreamState [it2-bootstrap]
Deepak S Patwardhan
deepak.patwardhan at itaas.com
Mon Jul 30 02:18:58 PDT 2012
Hello,
I am trying to understand the relation between Streamable and Stream
interfaces. I see that Streamable has a method named getStreamState - should
this not be in Stream ?
Example, Streamable has a method sorted which returns a Stream. So, how does
someone know that the resulting stream is sorted unless the method
getStreamState is moved into Stream and that would return, in this example,
Stream. STATE_SORTED.
On a lighter note, I was wondering if the *main* interface inside
java.util.streams is Stream or is it StreamOps? It seems like the latter,
but that name isn't JDK-licious (OK for internal implementation classes like
IdOp, EagerOp). May be, StreamOps can be named Stream, and current Stream
renamed to Streamer. That should also better fit the analogy
Iterable:Iterator::Streamable:Streamer .
Regards,
Deepak S Patwardhan.
More information about the lambda-dev
mailing list