choco.kernel.common.util.comparator
Class TaskComparators

java.lang.Object
  extended by choco.kernel.common.util.comparator.TaskComparators

public final class TaskComparators
extends Object

This class is a factory for tasks comparator. It uses a singleton pattern for each type of comparator.

Author:
Arnaud Malapert

Method Summary
static Comparator<ITask> makeEarliestCompletionTimeCmp()
          Compare according to the earliest completion times of a pair of tasks.
static Comparator<ITask> makeEarliestStartingTimeCmp()
          Compare according to the earliest starting times of a pair of tasks.
static Comparator<ITask> makeLatestCompletionTimeCmp()
          Compare according to the latest completion times of a pair of tasks.
static Comparator<ITask> makeLatestStartingTimeCmp()
          Compare according to the latest starting times of a pair of tasks.
static Comparator<ITask> makeMinDurationCmp()
          Compare according to task's durations.
static Comparator<IRTask> makeREarliestCompletionTimeCmp()
          Compare according to the earliest completion times of a pair of tasks.
static Comparator<IRTask> makeREarliestStartingTimeCmp()
          Compare according to the earliest starting times of a pair of tasks.
static Comparator<ITask> makeReverseEarliestCompletionTimeCmp()
           
static Comparator<ITask> makeReverseEarliestStartingTimeCmp()
          Compare according to the earliest starting times of a pair of tasks.
static Comparator<ITask> makeReverseLatestCompletionTimeCmp()
           
static Comparator<ITask> makeReverseLatestStartingTimeCmp()
          Compare according to the latest starting times of a pair of tasks.
static Comparator<IRTask> makeReverseREarliestCompletionTimeCmp()
           
static Comparator<IRTask> makeReverseREarliestStartingTimeCmp()
          Compare according to the earliest starting times of a pair of tasks.
static Comparator<IRTask> makeReverseRLatestCompletionTimeCmp()
           
static Comparator<IRTask> makeReverseRLatestStartingTimeCmp()
          Compare according to the latest starting times of a pair of tasks.
static Comparator<IRTask> makeRLatestCompletionTimeCmp()
          Compare according to the latest completion times of a pair of tasks.
static Comparator<IRTask> makeRLatestStartingTimeCmp()
          Compare according to the latest starting times of a pair of tasks.
static Comparator<ITask> makeRMinDurationCmp()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeLatestCompletionTimeCmp

public static Comparator<ITask> makeLatestCompletionTimeCmp()
Compare according to the latest completion times of a pair of tasks.

Returns:
LCT comparator

makeEarliestCompletionTimeCmp

public static Comparator<ITask> makeEarliestCompletionTimeCmp()
Compare according to the earliest completion times of a pair of tasks.

Returns:
ECT comparator

makeLatestStartingTimeCmp

public static Comparator<ITask> makeLatestStartingTimeCmp()
Compare according to the latest starting times of a pair of tasks.

Returns:
LST comparator

makeEarliestStartingTimeCmp

public static Comparator<ITask> makeEarliestStartingTimeCmp()
Compare according to the earliest starting times of a pair of tasks.

Returns:
EST comparator

makeReverseEarliestCompletionTimeCmp

public static Comparator<ITask> makeReverseEarliestCompletionTimeCmp()

makeReverseLatestStartingTimeCmp

public static Comparator<ITask> makeReverseLatestStartingTimeCmp()
Compare according to the latest starting times of a pair of tasks.

Returns:
LST comparator

makeReverseLatestCompletionTimeCmp

public static Comparator<ITask> makeReverseLatestCompletionTimeCmp()

makeReverseEarliestStartingTimeCmp

public static Comparator<ITask> makeReverseEarliestStartingTimeCmp()
Compare according to the earliest starting times of a pair of tasks.

Returns:
EST comparator

makeMinDurationCmp

public static Comparator<ITask> makeMinDurationCmp()
Compare according to task's durations.

Returns:
a duration comparator.

makeRMinDurationCmp

public static Comparator<ITask> makeRMinDurationCmp()

makeRLatestCompletionTimeCmp

public static Comparator<IRTask> makeRLatestCompletionTimeCmp()
Compare according to the latest completion times of a pair of tasks.

Returns:
LCT comparator

makeREarliestCompletionTimeCmp

public static Comparator<IRTask> makeREarliestCompletionTimeCmp()
Compare according to the earliest completion times of a pair of tasks.

Returns:
ECT comparator

makeRLatestStartingTimeCmp

public static Comparator<IRTask> makeRLatestStartingTimeCmp()
Compare according to the latest starting times of a pair of tasks.

Returns:
LST comparator

makeREarliestStartingTimeCmp

public static Comparator<IRTask> makeREarliestStartingTimeCmp()
Compare according to the earliest starting times of a pair of tasks.

Returns:
EST comparator

makeReverseREarliestCompletionTimeCmp

public static Comparator<IRTask> makeReverseREarliestCompletionTimeCmp()

makeReverseRLatestStartingTimeCmp

public static Comparator<IRTask> makeReverseRLatestStartingTimeCmp()
Compare according to the latest starting times of a pair of tasks.

Returns:
LST comparator

makeReverseRLatestCompletionTimeCmp

public static Comparator<IRTask> makeReverseRLatestCompletionTimeCmp()

makeReverseREarliestStartingTimeCmp

public static Comparator<IRTask> makeReverseREarliestStartingTimeCmp()
Compare according to the earliest starting times of a pair of tasks.

Returns:
EST comparator


Copyright © 2012. All Rights Reserved.