Decorator is a structural design pattern, so now you have a different implementation for each type If you don’t remember, here are them:
Hi, Bruno! Great tip. How could we classify a design pattern like this, where we include validation functions instead of adding new behaviors? Wouldn't that be a form of Decorator implementation? Best regards!
Is it?
we are talking about functions, lambdas, method references... we are discussing how to implement it using language features.
If you don't have it, perhaps a pattern would be useful.
Java has all these functionalities, we just need to use it, and avoid verbosity
Hi, Bruno! Great tip. How could we classify a design pattern like this, where we include validation functions instead of adding new behaviors? Wouldn't that be a form of Decorator implementation? Best regards!
Is it?
we are talking about functions, lambdas, method references... we are discussing how to implement it using language features.
If you don't have it, perhaps a pattern would be useful.
Java has all these functionalities, we just need to use it, and avoid verbosity