You are on page 1of 1

public void fillList(){

for(Line tempLine : lines){


for(Stop tempStop : tempLine.getStops()){
StopNode tempStopNode = new StopNode(tempStop);
for(Line tempLine2 : lines){
for(Stop tempStop2 : tempLine2.getStops()){
if(!excludedLines.contains(tempStop) && !
excludedLines.contains(tempStop2)){
if(tempStop!=(tempStop2)){
if(tempStop.getStation()==(tempStop2.getStation()))
{
tempStopNode.addAdjacentNode(new
StopNode(tempStop2),0);
}
else if(isAdjacent(tempStop,tempStop2)){
tempStopNode.addAdjacentNode(new
StopNode(tempStop2),1);
}
}
nodes.add(tempStopNode);
}
}
}
}
}
}

You might also like