I have created a TreeMap like so:
TreeMap<Integer, ArrayList<MyClass>> wrap = new TreeMap<Integer, ArrayList<MyClass>>();
I have created a constructor like so:
public foo (TreeMap<Integer, Collection<Spot> > objects) {
this.field = objects;
}
However, eclipse gives me a red squigly when I use the constructor, with my wrap
variable as the single parameter:
The constructor foo(TreeMap<Integer,ArrayList<Spot>>) is undefined
An ArrayList is a type of Collection...yes? So why is this not working?