Java – a design pattern that transforms one model into another
•
Java
Basically, there are some objects in my application that I have to convert to another third-party object before sending the request When I receive a response, I must convert these objects back to objects supported by my application
What patterns can be used to convert one model object to another in Java?
Solution
The adapter or appearance pattern should solve your problem:
Adapter: http://www.youtube.com/watch?v=TriX8OiEhOU
positive: http://www.youtube.com/watch?v=WLjvNpP6yeQ
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码