I’m using the strategy pattern to parse files of different formats.
Each strategy returns a list of strings parsed from the file. Now a requirement has been introduced to return some more data from one of the file types, so an update is required to one of the strategy’s. Is there a common practice to achieve this ? I could store the extra data in a Future but I think this is overkill ?
A possible solution I have come up with is to return a List of custom object types which store the extra parameter.