de.cau.cs.kieler.sim.kiem.config.managers
Class ScheduleComparator

java.lang.Object
  extended by de.cau.cs.kieler.sim.kiem.config.managers.ScheduleComparator
All Implemented Interfaces:
Serializable, Comparator<ScheduleData>

public class ScheduleComparator
extends Object
implements Comparator<ScheduleData>, Serializable

Compares schedule data based on their supported priorities for an editor. The sorter works in a way that the schedules with a high priority get the lowest compare() value to ensure that they stand at the beginning of the list.

See Also:
Serialized Form
Rating proposed yellow
(2010-01-27)

Constructor Summary
ScheduleComparator()
          Create a new comparator.
ScheduleComparator(EditorDefinition matchingEditor)
          Create a new comparator.
 
Method Summary
 int compare(ScheduleData arg0, ScheduleData arg1)
          
 
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

ScheduleComparator

public ScheduleComparator()
Create a new comparator. Schedules are sorted by name.


ScheduleComparator

public ScheduleComparator(EditorDefinition matchingEditor)
Create a new comparator.

Parameters:
matchingEditor - the editor to use for comparison.
Method Detail

compare

public int compare(ScheduleData arg0,
                   ScheduleData arg1)

Specified by:
compare in interface Comparator<ScheduleData>