public void ExportStopList(String filename,String systemName) throws IOException {
  BufferedWriter writer=new BufferedWriter(new FileWriter(filename));
  writer.write(systemName + " LIST OF STOPS");
  writer.newLine();
  writer.newLine();
  ArrayList<String> stops=new ArrayList<String>();
  for (  ScheduledRoute r : this.routes) {
    for (    String s : r.getStopSequence()) {
      if (!(stops.contains(s)))       stops.add(s);
    }
  }
  for (  String s : stops) {
    writer.write(s);
    writer.newLine();
  }
  writer.close();
}

public void ExportStopList ( String filename , String systemName ) throws IOException { BufferedWriter writer = new BufferedWriter ( new FileWriter ( filename ) ) ; writer . write ( systemName + " LIST OF STOPS" ) ; writer . newLine ( ) ; writer . newLine ( ) ; ArrayList < String > stops = new ArrayList < String > ( ) ; for ( ScheduledRoute r : this . routes ) { for ( String s : r . getStopSequence ( ) ) { if ( ! ( stops . contains ( s ) ) ) stops . add ( s ) ; } } for ( String s : stops ) { writer . write ( s ) ; writer . newLine ( ) ; } writer . close ( ) ; }
a function for exporting a master list of stops for all routes . also identifies stops with literal duplicate names ( ie , will recognize that " bramalea " and " bramalea " are the same , but not " bramalea " )
