Class StationList

java.lang.Object
  extended by StationList

public class StationList
extends Object


Constructor Summary
StationList()
          Construct a Station List
 
Method Summary
 Station find(String name)
          Searches the list for a specific station
 void load(String filename)
          Reads a file with station objects
static void main(String[] args)
          Test and demonstration program
 void print()
          Prints the list of stations one per line using the stations toString-method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StationList

public StationList()
Construct a Station List

Method Detail

find

public Station find(String name)
Searches the list for a specific station

Parameters:
name - The station name to be searched for
Returns:
A station object with the specified name or null if no such station found

load

public void load(String filename)
          throws IOException
Reads a file with station objects

Parameters:
filename - The file name
Throws:
IOException

print

public void print()
Prints the list of stations one per line using the stations toString-method.


main

public static void main(String[] args)
                 throws IOException
Test and demonstration program

Throws:
IOException