taxisrus.implementation.scheduler_stuff
Class CustomerCollection
java.lang.Object
|
+--taxisrus.implementation.scheduler_stuff.CustomerCollection
- public class CustomerCollection
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CustomerCollection
public CustomerCollection()
- Simple constructor
getHighPri
public Iterator getHighPri()
- Get high priority queue. May be replaced with by zone sorting.
- Returns:
- ArrayList - High priority customers
waitingSize
public int waitingSize(int zone_id)
- Get size of high priority queue in a given zone.
- Parameters:
int - - Id of zone we want the size of- Returns:
- int - Number of high-priority customers in zone
getWaitingIterator
public Iterator getWaitingIterator()
- Return an iterator for the customers with WAITING status. Used in the scheduling process.
- Returns:
- Iterator - Iterator for customers with WAITING status
add
public void add(Customer to_add)
- Adds a customer to the set.
- Parameters:
Customer - to_add - The customer being added to the collection.
remove
public Customer remove(Object to_remove)
- Remove a customer from the collection.
- Parameters:
Customer - to_remove - The customer being removed- Returns:
- Customer - The object removed.
find
public Customer find(Customer to_find)
- Find given object in the lists, and return it. Return null if not found.
- Parameters:
Object - - Object to find- Returns:
- Customer - Customer found. null if not found.
API documentation for build 958