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

A

addTransitBusListener(TransitBusListener) - Method in class hw6.TrafficReceiver
Add an object that wants to be notified of TransitBusEvents.

C

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

D

dataReceived(TransitBusEvent) - Method in interface hw6.TransitBusListener
Invoked when a new TransitBus event record is available
dataReceived(TransitBusEvent) - Method in class hw6.TransitSystem
This method is called every time a new bus information data record arrives.
distance(Location) - Method in class hw6.Location
Calculate the distance between two locations.
distanceTo(Locatable) - Method in interface hw6.Locatable
Calculate the distance to another Locatable object
distanceTo(Locatable) - Method in class hw6.LocatedVehicle
Calculate the distance to another Locatable object

E

equals(Object) - Method in class hw6.Vehicle
Indicates whether some other object is "equal to" this one, based on a comparison of vehicle id numbers.
extractedDataReceived(Hashtable, String) - Method in class hw6.TrafficReceiver
This method is called when a data frame arrives from the transmitter and has been pre-processed into a hashtable with one ContentsData object for each table in the data frame.

F

fireTransitBusEvent(String, int, double, double, int) - Method in class hw6.TrafficReceiver
Notify all listeners that have registered interest for notification on TransitBusEvents that a new data record has arrived.

G

getBusList() - Method in class hw6.TransitSystem
Create a list of all the buses in the system.
getLat() - Method in class hw6.TransitBusEvent
Get the latitude value
getLocation() - Method in interface hw6.Locatable
Return a reference to a copy of the Location object describing our current position.
getLocation() - Method in class hw6.LocatedVehicle
Return a reference to a copy of the Location object describing our current position.
getLon() - Method in class hw6.TransitBusEvent
Get the longitude value
getRoute() - Method in class hw6.TransitBus
Get the route number for this TransitBus.
getRoute() - Method in class hw6.TransitBusEvent
Get the current route number
getTimeValue() - Method in class hw6.TransitBusEvent
Get the time value string.
getVIN() - Method in class hw6.TransitBusEvent
Get the vehicle identification number.
getVIN() - Method in class hw6.Vehicle
Return the vehicle id number for this Vehicle.

H

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

L

Locatable - interface hw6.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 hw6.LocatedVehicle.
This class implements the ability to give a Vehicle a Location.
LocatedVehicle(int, double, double) - Constructor for class hw6.LocatedVehicle
Create a new LocatedVehicle object with the given vehicle id number and located at the given location.
Location - class hw6.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 hw6.Location
Create a new Location object, given a latitude and longitude.

M

main(String[]) - Static method in class hw6.Location
Test harness for this class.
main(String[]) - Static method in class hw6.Vehicle
Test harness for this class.

R

removeTransitBusListener(TransitBusListener) - Method in class hw6.TrafficReceiver
Remove an object that no longer wants to be notified of TransitBusEvents.

S

setLocation(double, double) - Method in interface hw6.Locatable
Set the values of our current Location by copying them from the arguments provided.
setLocation(double, double) - Method in class hw6.LocatedVehicle
Set the values of our current Location by copying them from the arguments provided.
setLocation(Location) - Method in interface hw6.Locatable
Set the values of our current Location by copying them from the given Location object.
setLocation(Location) - Method in class hw6.LocatedVehicle
Set the values of our current Location by copying them from the given Location object.
setRoute(int) - Method in class hw6.TransitBus
Set the route number for this TransitBus.
start() - Method in class hw6.TransitSystem
This method is called to start the system operating.
stop() - Method in class hw6.TransitSystem
This method is called to stop the system operating.

T

toString() - Method in class hw6.LocatedVehicle
Provide a String representation of this LocatedVehicle.
toString() - Method in class hw6.Location
Provide a String representation of our location.
toString() - Method in class hw6.TransitBus
Provide a String representation of this TransitBus.
toString() - Method in class hw6.TransitBusEvent
return a String describing this event
toString() - Method in class hw6.Vehicle
Provide a String representation of this Vehicle.
TrafficReceiver - class hw6.TrafficReceiver.
This class reads a network socket to get updates indicating where the buses in the King County Metro bus system are.
TrafficReceiver(String, int) - Constructor for class hw6.TrafficReceiver
Create a TrafficReceiver object to read data from the specified source.
TransitBus - class hw6.TransitBus.
This class implements a TransitBus, which is a LocatedVehicle with an integer route number.
TransitBus(int, double, double, int) - Constructor for class hw6.TransitBus
Create a new TransitBus object with the given vehicle id number, located at the given location, with the given route number.
TransitBusEvent - class hw6.TransitBusEvent.
This class implements a simple event that is fired whenever a new TransitBus position record is received.
TransitBusEvent(Object, String, int, double, double, int) - Constructor for class hw6.TransitBusEvent
Create a new TransitBusEvent.
TransitBusListener - interface hw6.TransitBusListener.
This interface defines the methods that must be implemented by classes that want to listen for TransitBusEvents.
TransitSystem - class hw6.TransitSystem.
This class builds and manages the transit system for homework 6.
TransitSystem(String, int) - Constructor for class hw6.TransitSystem
Create a set of buses for this transit system.

U

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

V

Vehicle - class hw6.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 hw6.Vehicle
Create a new Vehicle with the given vehicle identification number.
vin - Variable in class hw6.Vehicle
the vehicle identification number

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