taxisrus.implementation.scheduler_stuff
Class CustomerPriorityComparator

java.lang.Object
  |
  +--taxisrus.implementation.scheduler_stuff.CustomerPriorityComparator
All Implemented Interfaces:
Comparator

public class CustomerPriorityComparator
extends Object
implements Comparator


Constructor Summary
CustomerPriorityComparator()
          Simple constructor.
 
Method Summary
 int compare(Object customer_one, Object customer_two)
          Compare two customers by priority.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

CustomerPriorityComparator

public CustomerPriorityComparator()
Simple constructor.
Method Detail

compare

public int compare(Object customer_one,
                   Object customer_two)
Compare two customers by priority. Call in time is used as a backup for comparison. Will return a negative number if customer_one has a higher priority than customer two. This allows us to sort a list using this comparator and the first element in the list will have the highest priority.
Specified by:
compare in interface Comparator
See Also:
Comparator


API documentation for build 958