|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
| Field Summary | |
static boolean |
ASK_CABS_ONLY_ONCE
|
static int |
DEFAULT_AVERAGE_WAIT
|
static long |
DEFAULT_MIN_ETA
|
| Method Summary | |
Date |
addCustomerToQueue(Customer to_pickup)
Add a new customer to queue of customers waiting to be picked up. |
void |
assignMapper(MapperInterface new_main_mapper)
Stores a reference to the main mapper. |
void |
assignModel(ModelInterface new_main_model)
Stores a reference to the main model. |
void |
assignNewAverageWait(int new_average_wait)
Store a new average_wait. |
void |
assignNewMinETA(int new_min_ETA)
Store a new min_ETA. |
boolean |
cancelCustomer(Customer to_cancel)
Cancel given Customer's ride request. |
Customer |
changeCustomerCopy(Customer currCust,
Customer newCust)
Finds currCust within the scheduler, and replaces it with newCust. |
boolean |
customerPickup(int cab_id)
Function to remove customers from the Scheduler's queue when they are picked up. |
Customer |
findCustomer(Customer to_find)
Check if a customer is in a queue. |
int |
getAverageWait()
Get current value of average_wait. |
int |
getMinETA()
Get current value of min_ETA, in minutes. |
| Field Detail |
public static final boolean ASK_CABS_ONLY_ONCE
public static final int DEFAULT_AVERAGE_WAIT
public static final long DEFAULT_MIN_ETA
| Method Detail |
public int getAverageWait()
public int getMinETA()
public void assignModel(ModelInterface new_main_model)
throws BadParamException
Model - main_modelBadParamException -
public void assignMapper(MapperInterface new_main_mapper)
throws BadParamException
Mapper - main_mapperBadParamException -
public void assignNewAverageWait(int new_average_wait)
throws BadParamException
int - new_average_wait, in minutesBadParamException -
public void assignNewMinETA(int new_min_ETA)
throws BadParamException
int - new_min_ETA, in minutesBadParamException - if new_min_ETA < 0public Date addCustomerToQueue(Customer to_pickup)
Customer - to_queue - Customer to add to listpublic Customer findCustomer(Customer to_find)
Customer - - Customer to find.public boolean cancelCustomer(Customer to_cancel)
Customer - - Customer to cancelpublic boolean customerPickup(int cab_id)
cab_id - - ID of the Cab that just picked up the customer
public Customer changeCustomerCopy(Customer currCust,
Customer newCust)
Customer - currCust - Old customer as stored in SchedulerCustomer - newCust - New customer to replace currCust in Scheduler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||