I know this has been asked a lot in stackoverflow but I could not find answers that work to my problem.
In the following code below, I cant print out each item in
private HashMapArrayList> edges;
// ...later
Edge e = new Edge(from,to,T);
// ...later
else {
tmp = new ArrayList();
edges.put(e.from,tmp);
}
tmp.add(e);
Ultimately, this is a classic example of why raw types are bad. You've got an ArrayList
and you put Edge
s in it.
Unfortunately, I don't know how to tell you how to fix it since I don't understand what you're trying to do.