Hi,
What is the advice on representing collection of objects in a system. Since we already we have abstractions like Array and Lists to represents collection it becomes difficult to make the choice.
For example I am reading the list of quotes in my repository:
public class QuoteRepository {
class QuoteList extends ArrayList<Quote> {}
String path = "data/quotes.json";
BufferedReader br = new BufferedReader(new FileReader(path));
return gson.fromJson(br, Quote[].class);
} catch (IOException e) {
is it ok to pass around the Array of quotes or should I wrap the response from the repository in a QuoteList abstraction?
Thanks,