|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object airline.CollectRoutes
public class CollectRoutes
Constructor Summary | |
---|---|
CollectRoutes()
Creates a new instance of CollectRoutes. |
Method Summary | |
---|---|
boolean |
addNextRoute(Route currRoute)
adding route to the collection |
void |
displayAllRoutes(java.io.PrintWriter outpw)
displays to a file all current routes. |
Route |
getNthRoute(int nth)
report a particular route (by position in the collection) |
int |
getNumRoutes()
report how many actual routes are in the collection |
Route |
getRouteByCode(java.lang.String depart,
java.lang.String arriv)
Get route corresponding to passed airport codes (returns unknown route if not found) |
int |
readRoutesFromFile(java.lang.String filename,
CollectAirports allAirports)
create a collection of routes via reading a file (filename is passed). |
boolean |
setNthRoute(Route currRoute,
int num)
change a particular route (by position in the collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CollectRoutes()
Method Detail |
---|
public int getNumRoutes()
public void displayAllRoutes(java.io.PrintWriter outpw)
public boolean addNextRoute(Route currRoute)
public Route getNthRoute(int nth)
public boolean setNthRoute(Route currRoute, int num)
public Route getRouteByCode(java.lang.String depart, java.lang.String arriv)
public int readRoutesFromFile(java.lang.String filename, CollectAirports allAirports)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |