Stream reuse in superclass

Paul Sandoz paul.sandoz at oracle.com
Fri Apr 5 01:50:55 PDT 2013


On Apr 5, 2013, at 9:24 AM, Henry Jen <henry.jen at oracle.com> wrote:
> The other common idiom would be chaining Stream process,
> 
> Class Foo {
> 	bar (Stream<T> s) {…}
> }
> 
> Class PowerFoo extends Foo {
> 	Stream<T> doSomethingWith(Stream<T> s) {…}
> 	bar (Stream<T> s) {
> 		return super.bar(doSomethingWith(s));
> 	}
> }
> 

Yes, that is is:

   return the unlinked stream, which is always the tail of the pipeline.

Paul.


More information about the lambda-dev mailing list