I have method that parses a list of String
records into objects and returns List
of objects. So my method signature is like this.
public List<ParsedObject> parse(String[] records)
;
But I also want to return, other metrics like number of string records that were not parsed successfully. Now I get confused, how to return this metric. One option would be to create another wrapper class that holds both list of parsed records and members to store these metrics.
But I face this situation very often and this way I would end up in creating many wrapper classes.
Not sure if I explained well. Any suggestions here?