Intermediate operation
An intermediate operation is a pipeline transformation or selection that produces another sequence or flow for further processing, typically before a terminal operation.
100 Java Mistakes and How to Avoid Them
An intermediate operation is a Java Stream pipeline operation that describes a transformation or selection and produces another stream for further processing.
- How it is used
- Builds deferred Stream transformations and selections before a terminal operation produces a result.
- How deep it goes
- Explains deferred execution, side-effect hazards, reassignment, and single-use failures, without detailing Stream internals.
- Examples
- Contrasts a mutating filter with partitioningBy(), and conditional skip code with reassignment or skip(0).
- What you can do after
- Diagnose/debug with it by identifying unsafe side effects, discarded returned streams, and attempted stream reuse.
Read how 100 Java Mistakes and How to Avoid Them explains intermediate operation →
Kotlin in Action, 2E
An intermediate operator is a Flow transformation that collects values from an upstream flow and emits transformed or otherwise produced values to a downstream flow.
- How it is used
- Transforms sequential values over time while composing cold Flow pipelines before collection.
- How deep it goes
- Explains upstream/downstream flow, cold execution, lifecycle behavior, and custom implementation through flow and collect.
- Examples
- Demonstrates map, filter, onEach, onStart, onCompletion, onEmpty, and a rolling average over the last n values.
- What you can do after
- Apply via Kotlin Flow operators or build custom transformations with flow, collect, and emit.
Read how Kotlin in Action, 2E explains intermediate operation →
The Art of Code
An intermediate operation is a pipeline operation that describes a further transformation and normally defers its execution until a terminal operation.
- How it is used
- Shapes Java stream data into a readable sequence of transformations before execution.
- How deep it goes
- Explains pipeline stages, laziness, chaining, and consumption without descending into stream implementation internals.
- Examples
- Uses book collections, recent-publication filtering, author mapping, annotated stream listings, and imperative-to-pipeline comparisons.
- What you can do after
- Apply via the Java Stream API to compose lazy filter, map, and flatMap transformations before materializing results.
Related concepts
- retryused by · A retry is a subsequent attempt to perform an operation after an earlier attempt fails or does not complete successfully.
- flowuses · A Flow is an asynchronous stream abstraction whose values are collected over time and whose producer may be cold, executing anew for each collection.
- sequenceproduces · A sequence is an ordered collection of elements whose positions determine their order of traversal or processing.
- upstream flowuses · An upstream flow is the portion of a flow, including preceding intermediate operators, that occurs before a specified operator.
- lazy evaluationuses · Lazy evaluation is an evaluation strategy that defers computing an expression or value until its result is needed, potentially avoiding the computation entirely.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


