1. Lambda Expressions
2.Optional
3.Stream
- Creating Stream
- The final build is a ReferencePipeline.Head objects
- Followed by zero or more intermediate operations (methods below to map an example, most logical Similarly other methods)
- A configuration StatelessOp objects (ReferencePipeline inner class)
- Is essentially a construct for the intermediate operation ReferencePipeline (ReferencePipeline constructor b)
- Meanwhile rewrite opWrapSink method
- Build and returns a Sink.ChainedReference objects
- Rewrite accept method
- Due to the termination of operation occurs, Sink will be called by the end of the stage to move forward, and therefore the type of the parameter passed to P_OUT
- Rewrite accept method
- Build and returns a Sink.ChainedReference objects
- A configuration StatelessOp objects (ReferencePipeline inner class)
- Finally, add a termination operation
- If the operation is not terminated, stream only constructed a series of objects, and objects inside the method call is not triggered, so the stream will not do anything
- When there is no intermediate operation before the operation is terminated, for considerations of efficiency, the data source directly traverse
- When there is an intermediate operating
- By constructing the plant TerminalOp acquires corresponding TerminalOp
- evaluateSequential method call in TerminalOP
- Call PipelineHelper of wrapAndCopyInto method (ReferencePipeline realized PipelineHelper Interface) for data to traverse