Bonjours à tous,
Voilà mon souci ,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| public void dessinerLiaison(){
Iterator<Station> it = stations.iterator();
while(it.hasNext()){
Station temp=it.next();
int [] coorddep = r.find(temp.getId()).getCoord();
System.out.println(coorddep[0]+ " " + coorddep[1]);
Iterator<Station> it2 = stations2.iterator();
while(it2.hasNext()){
Station temp2=it2.next();
int[] coordarr = r.find(temp.ligneCommune(temp2)).getCoord();
System.out.println("Depart"+coorddep[0] +" "+coorddep[1]+" Arrivée"+coordarr[0]+" "+coordarr[1]);
ligne(null, coorddep[0],coorddep[1],coordarr[0],coordarr[1]);
}
}
} |
Le nulExceptionPointer se situe au niveau de la ligne suivante :
r.find(temp.ligneCommune(temp2)).getCoord();
J'ai pourtant utiliser 2 listes différentes ( qui contienne exactement la meme chose ) car j'ai cru que c'etait le fait de parcourir la meme liste avec 2 iterator mais non ...
Que faire ?
Merci d'avance !!!
Partager