I have this class:
public class Team {
private String name;
private ArrayList<Participant> teamMembers; //
private ArrayList<Instrument> membersInstruments;
And I want to get to an arraylist the Intruments from the entire team members, so I tried this...
teamMambers.getInstruments.forEach((i) -> this.auxArrayList.add(i));
And it doesn't work.
What I want to do is, each member has their own ArrayList of instruments. So I made a get method that returns an ArrayList containing all the instruments the member has. I thought that, if I have an ArrayList of Members, then I could cycle through their get methods somehow... But clearly am going through the wrong path... Any tip/help please?