Java: A design pattern for building a text file from different methods
<p>I'm building a file by appending text based on different parameters.</p>

<p>Lets say my file will have 3 paragraphs A, B, C, and you can build each paragraph in 3 different ways</p>

<p>At the end you end up with something like A1, B2, C3 or A1, B1, C1 or A2, B1, C2 and so on</p>

<p>I already did this with a lot of IFs, and the ugliest part was the fact that each class had parameters of the following ones. For instance A receives 3 parameters and passes 2 to B, then B passes the last one to C</p>

<p>This is not extensible or maintainable at all, I really feel everything is chained and I want to break the chain, so how can I implement this neatly?</p>
