A C D E F G H L M P S T U V

A

addBus(TransitBus) - Method in class TransitSystem
Add a bus to the busList.

C

clone() - Method in class Location
Create a copy of this Location object.
compareTo(Object) - Method in class Vehicle
Compares this object with the specified object for order, based on the vehicle identification number.

D

distance(Location) - Method in class Location
Calculate the distance between two locations.
distanceTo(Locatable) - Method in class Landmark
Calculate the distance to another Locatable object
distanceTo(Locatable) - Method in interface Locatable
Calculate the distance to another Locatable object
distanceTo(Locatable) - Method in class LocatedVehicle
Calculate the distance to another Locatable object

E

equals(Object) - Method in class Vehicle
Indicates whether some other object is "equal to" this one, based on a comparison of vehicle id numbers.

F

findClosestBus(Locatable) - Method in class TransitSystem
Find the bus closest to the given Locatable object
findClosestBusOnRoute(int, Locatable) - Method in class TransitSystem
Find the bus on a particular route that is closest to the given Locatable object

G

getLocation() - Method in class Landmark
Return a reference to a copy of the Location object describing our position.
getLocation() - Method in interface Locatable
Return a reference to a copy of the Location object describing our current position.
getLocation() - Method in class LocatedVehicle
Return a reference to a copy of the Location object describing our current position.
getName() - Method in class Landmark
Return the name of this Landmark.
getRoute() - Method in class TransitBus
Get the route number for this TransitBus.
getVIN() - Method in class Vehicle
Return the vehicle id number for this Vehicle.

H

hashCode() - Method in class Vehicle
Returns a hash code value for this Vehicle, namely the vehicle identification number.

L

Landmark - class Landmark.
This class implements Locations with names.
Landmark(String, double, double) - Constructor for class Landmark
Create a new Landmark object with the given name located at the given location.
Locatable - interface Locatable.
This interface defines the methods that a class must implement in order to be locatable in a 2-dimensional latitude / longitude world.
LocatedVehicle - class LocatedVehicle.
This class implements the ability to give a Vehicle a Location.
LocatedVehicle(int, double, double) - Constructor for class LocatedVehicle
Create a new LocatedVehicle object with the given vehicle id number and located at the given location.
Location - class Location.
This class is a way for objects to keep track of where they are in a 2-dimensional latitude & longitude based coordinate system.
Location(double, double) - Constructor for class Location
Create a new Location object, given a latitude and longitude.

M

main(String[]) - Static method in class Location
Test harness for this class.
main(String[]) - Static method in class Metro
 
main(String[]) - Static method in class Vehicle
Test harness for this class.
Metro - class Metro.
This class constructs and operates a TransitSystem.
Metro() - Constructor for class Metro
 

P

printBusList() - Method in class TransitSystem
Print out all the buses in the bus list.
printBusOnRouteList(int) - Method in class TransitSystem
Print out all the buses in the bus list that are on a given route.

S

setLocation(double, double) - Method in class Landmark
Set the values of our current Location by copying them from the arguments provided.
setLocation(double, double) - Method in interface Locatable
Set the values of our current Location by copying them from the arguments provided.
setLocation(double, double) - Method in class LocatedVehicle
Set the values of our current Location by copying them from the arguments provided.
setLocation(Location) - Method in class Landmark
Set the values of our current Location by copying them from the given Location object.
setLocation(Location) - Method in interface Locatable
Set the values of our current Location by copying them from the given Location object.
setLocation(Location) - Method in class LocatedVehicle
Set the values of our current Location by copying them from the given Location object.
setRoute(int) - Method in class TransitBus
Set the route number for this TransitBus.

T

toString() - Method in class Location
Provide a String representation of our location.
toString() - Method in class Vehicle
Provide a String representation of this Vehicle.
TransitBus - class TransitBus.
This class implements a TransitBus, which is a LocatedVehicle with an integer route number.
TransitBus(int, double, double, int) - Constructor for class TransitBus
Create a new TransitBus object with the given vehicle id number, located at the given location, with the given route number.
TransitSystem - class TransitSystem.
This class builds and manages the transit system for homework 5.
TransitSystem() - Constructor for class TransitSystem
Create a set of buses for this transit system.

U

update(double, double) - Method in class Location
Update the current location based on the values provided.
update(Location) - Method in class Location
Update the current location based on the Location object provided.

V

Vehicle - class Vehicle.
This class provides an implementation for a basic vehicle that has a vehicle identification number and the ability to sort based on that number.
Vehicle(int) - Constructor for class Vehicle
Create a new Vehicle with the given vehicle identification number.

A C D E F G H L M P S T U V