Saving fish by writing code! Applications developer in fisheries, specializing in webapps and moving 'enterprise-y' legacy systems to modern agile systems - Email or tweet me if you want to talk!
You certainly could use the decorator pattern with the validation. I'm not sure how it would play with the functional approach, but it would be interesting to take for a test drive and see.
Another pattern I thought of trying out is the chained filter pattern in the Validator class. I think that could give some richer possibilities for linking business rules together.
If I were doing this for real, I would have the related functions all in one empty class, and the methods like checkWidgetTransfer in a different class, yes. I've found functional Java tends to collect a couple classes that are empty except for functions, which felt weird at first, but where else are you going to put them?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You certainly could use the decorator pattern with the validation. I'm not sure how it would play with the functional approach, but it would be interesting to take for a test drive and see.
Another pattern I thought of trying out is the chained filter pattern in the Validator class. I think that could give some richer possibilities for linking business rules together.
If I were doing this for real, I would have the related functions all in one empty class, and the methods like checkWidgetTransfer in a different class, yes. I've found functional Java tends to collect a couple classes that are empty except for functions, which felt weird at first, but where else are you going to put them?