etm.contrib.util
Class ExecutionAggregateComparator

java.lang.Object
  extended by etm.contrib.util.ExecutionAggregateComparator
All Implemented Interfaces:
java.util.Comparator

public class ExecutionAggregateComparator
extends java.lang.Object
implements java.util.Comparator

A comparator that may be used to sort ExecutionAggregates.

Since:
1.2.0
Version:
$Revision: 150 $
Author:
void.fm

Field Summary
static int TYPE_AVERAGE
           
static int TYPE_EXCECUTIONS
           
static int TYPE_MAX
           
static int TYPE_MIN
           
static int TYPE_NAME
           
static int TYPE_TOTAL
           
 
Constructor Summary
ExecutionAggregateComparator()
           
ExecutionAggregateComparator(int aType)
           
ExecutionAggregateComparator(int aType, boolean descendingOrder)
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
           
protected  int compareAverage(Aggregate one, Aggregate two)
           
protected  int compareExecutions(Aggregate one, Aggregate two)
           
protected  int compareMax(Aggregate one, Aggregate two)
           
protected  int compareMin(Aggregate one, Aggregate two)
           
protected  int compareName(Aggregate one, Aggregate two)
           
protected  int compareTotal(Aggregate one, Aggregate two)
           
 int getType()
           
 boolean isDescending()
           
 
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

TYPE_NAME

public static final int TYPE_NAME
See Also:
Constant Field Values

TYPE_EXCECUTIONS

public static final int TYPE_EXCECUTIONS
See Also:
Constant Field Values

TYPE_AVERAGE

public static final int TYPE_AVERAGE
See Also:
Constant Field Values

TYPE_MIN

public static final int TYPE_MIN
See Also:
Constant Field Values

TYPE_MAX

public static final int TYPE_MAX
See Also:
Constant Field Values

TYPE_TOTAL

public static final int TYPE_TOTAL
See Also:
Constant Field Values
Constructor Detail

ExecutionAggregateComparator

public ExecutionAggregateComparator()

ExecutionAggregateComparator

public ExecutionAggregateComparator(int aType)

ExecutionAggregateComparator

public ExecutionAggregateComparator(int aType,
                                    boolean descendingOrder)
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Specified by:
compare in interface java.util.Comparator

compareName

protected int compareName(Aggregate one,
                          Aggregate two)

compareExecutions

protected int compareExecutions(Aggregate one,
                                Aggregate two)

compareAverage

protected int compareAverage(Aggregate one,
                             Aggregate two)

compareMin

protected int compareMin(Aggregate one,
                         Aggregate two)

compareMax

protected int compareMax(Aggregate one,
                         Aggregate two)

compareTotal

protected int compareTotal(Aggregate one,
                           Aggregate two)

getType

public int getType()

isDescending

public boolean isDescending()


Copyright © 2004,2005, 2006, 2007 void.fm. All Rights Reserved.