java-design-patterns/collection-pipeline
Anurag Agarwal 2f49648047 Resolves checkstyle errors for collection-pipeline, command, commander (#1061)
* Reduces checkstyle errors in collection-pipeline

* Reduces checkstyle errors in command

* Reduces checkstyle errors in commander
2019-11-09 21:35:15 +02:00
..
2018-09-08 20:38:04 +05:30
2019-10-12 20:05:54 +03:00
2018-09-01 15:48:36 +05:30

layout, title, folder, permalink, categories, tags
layout title folder permalink categories tags
pattern Collection Pipeline collection-pipeline /patterns/collection-pipeline/ Functional
Java
Difficulty-Beginner
Functional

Intent

Collection Pipeline introduces Function Composition and Collection Pipeline, two functional-style patterns that you can combine to iterate collections in your code. In functional programming, it's common to sequence complex operations through a series of smaller modular functions or operations. The series is called a composition of functions, or a function composition. When a collection of data flows through a function composition, it becomes a collection pipeline. Function Composition and Collection Pipeline are two design patterns frequently used in functional-style programming.

alt text

Applicability

Use the Collection Pipeline pattern when

  • When you want to perform a sequence of operations where one operation's collected output is fed into the next
  • When you use a lot of statements in your code
  • When you use a lot of loops in your code

Credits