Am trying to solve one of my problem with functional interface and lambda combination and implement chain of responsibility design pattern.
When I tried to create functional interface with apply , andThen I came across the challenge. So I would like to confirm here.
Based on two inputs I will create third object and I want to apply some additional logic in “andThen” functional.
I face the challenge here. It couldn’t be different types from input.
Can I pass 2 input to apply and output of apply(different data type) have a andThen to do some more work and return the object(created in apply)
Aucun commentaire:
Enregistrer un commentaire