I would like to know how to be able to invoke the contains method directly on my class instead on its ArrayList variable. Best way to explain is really with the code below.
Thanks for your help.
public class Chord {
ArrayList<Note> notes;
// some more stuff not here
}
cmaj = new Chord("Cmaj");
cnote = new Note("C");
// what I have
cmaj.getNotes().contains(cnote);
// what I would like, is this possible, how?
cmaj.contains(cnote);
Well you can just write the method yourself: