You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-1
Original file line number
Diff line number
Diff line change
@@ -243,7 +243,11 @@ Due to the nature of parallel stream, computations may not behave in intended wa
243
243
244
244
## Explanation Combinator Pattern
245
245
246
-
- To be defined
246
+
Combinator pattern is a pattern in which complex structures are built by defining a small set of very simple 'primitives', and a set of 'combinators' for combining them into more complicated structures.
247
+
248
+
This pattern is very useful for doing validation as it helps increase as well as decrease the validation on an object within the business logic. It is implemented inside _combinatorpattern_ package within _CustomerRegistrationValidator_ interface which extends Function<Customer, ValidationResult> where _Customer_ is the business object on which validation is applied whereas _ValidationResult_ is an enum which indicates the possible outcomes of the validation.
249
+
250
+
**Reference:** The source code for the Combinator pattern is present in [CustomerRegistrationValidatorSet.java](https://github.com/syedumerahmedcode/java-functional-programming/blob/master/src/main/java/combinatorpattern/CustomerRegistrationValidatorSet.java) class and it is used in [Main.java](https://github.com/syedumerahmedcode/java-functional-programming/blob/master/src/main/java/combinatorpattern/Main.java) class.
247
251
248
252
249
253
## Explanation Other Important Points
@@ -301,6 +305,7 @@ Due to the nature of parallel stream, computations may not behave in intended wa
0 commit comments