I'm in the middle of refactoring some code on my current project, and I'd like some input on if any design pattern exists for the following scenario.
I have a class which executes some logic and returns an object containing the results of said logic; Let's call this the Result object. The state information contained in the Result object is constructed based on a more complex object, the Intermediary object.
Now the code which populates the Result object from the Intermediary object already exists, but since I'm refactoring I want to make this cleaner. I was thinking of creating a separate class, maybe called ResultBuilder, which has a static execute method which takes Intermediary as input and spits out Result as output.
Is there a design pattern which is equivalent to the "ResultBuilder" class? Is there a better way of going about constructing a Result object from an Intermediary object?