org.deltava.comparators
Class PerformanceComparator
java.lang.Object
org.deltava.comparators.AbstractComparator<PerformanceMetrics>
org.deltava.comparators.PerformanceComparator
- All Implemented Interfaces:
- Serializable, Comparator<PerformanceMetrics>
public class PerformanceComparator
- extends AbstractComparator<PerformanceMetrics>
A Comparator to sort Performance Metrics beans.
- Since:
- 1.0
- Version:
- 3.0
- Author:
- Luke
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
public static final int NAME
- See Also:
- Constant Field Values
AVERAGE
public static final int AVERAGE
- See Also:
- Constant Field Values
MAX
public static final int MAX
- See Also:
- Constant Field Values
MIN
public static final int MIN
- See Also:
- Constant Field Values
COUNT
public static final int COUNT
- See Also:
- Constant Field Values
PerformanceComparator
public PerformanceComparator(int comparisonType)
- Creates a new comparator with a particular comparison type code.
- Parameters:
comparisonType - the comparison type code
- Throws:
IllegalArgumentException - if the type is invalid- See Also:
AbstractComparator.setComparisonType(int)
PerformanceComparator
public PerformanceComparator(String comparisonType)
- Creates a new comparator with a particular comparison type name.
- Parameters:
comparisonType - the comparison type name
- Throws:
IllegalArgumentException - if the type is invalid- See Also:
AbstractComparator.setComparisonType(String)
compareImpl
protected int compareImpl(PerformanceMetrics m1,
PerformanceMetrics m2)
- Compares two PerformanceMetrics beans by the designated criteria.
- Specified by:
compareImpl in class AbstractComparator<PerformanceMetrics>
- Parameters:
m1 - The first object to comparem2 - The second object to compare
- Returns:
- -1, 0, 1 as defined by the compareTo(Object, Object) interface
- Throws:
ClassCastException - if either object is not a PerformanceMetrics bean- See Also:
Comparator.compare(Object, Object)
Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.