choco.kernel.common.util.comparator
Class MinDurationCmp

java.lang.Object
  extended by choco.kernel.common.util.comparator.MinDurationCmp
All Implemented Interfaces:
Comparator<ITask>

public final class MinDurationCmp
extends Object


Field Summary
static Comparator<ITask> RSINGLETON
           
static MinDurationCmp SINGLETON
           
 
Method Summary
 int compare(ITask task1, ITask task2)
           
 int getValue(ITask task)
          Computes the comparison criteria for a task.
 
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
 

Field Detail

SINGLETON

public static final MinDurationCmp SINGLETON

RSINGLETON

public static final Comparator<ITask> RSINGLETON
Method Detail

getValue

public int getValue(ITask task)
Computes the comparison criteria for a task.

Returns:
the value of the criteria

compare

public int compare(ITask task1,
                   ITask task2)
Specified by:
compare in interface Comparator<ITask>
See Also:
Comparator.compare(Object, Object)


Copyright © 2012. All Rights Reserved.