org.deltava.comparators
Class FlightReportComparator
java.lang.Object
org.deltava.comparators.AbstractComparator<FlightReport>
org.deltava.comparators.FlightReportComparator
- All Implemented Interfaces:
- Serializable, Comparator<FlightReport>
public class FlightReportComparator
- extends AbstractComparator<FlightReport>
A comparator to sort Flight Reports.
- Since:
- 1.0
- Version:
- 2.7
- Author:
- Luke
- See Also:
- Serialized Form
|
Constructor Summary |
FlightReportComparator(int comparisonType)
Creates a new FlightReport comparator with a particular comparison type code. |
FlightReportComparator(String typeName)
Creates a new FlightReport comparator with a particular comparison type name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DATE
public static final int DATE
- See Also:
- Constant Field Values
LENGTH
public static final int LENGTH
- See Also:
- Constant Field Values
DISTANCE
public static final int DISTANCE
- See Also:
- Constant Field Values
EQUIPMENT
public static final int EQUIPMENT
- See Also:
- Constant Field Values
ORIGIN
public static final int ORIGIN
- See Also:
- Constant Field Values
DESTINATION
public static final int DESTINATION
- See Also:
- Constant Field Values
PROCESSING_TIME
public static final int PROCESSING_TIME
- See Also:
- Constant Field Values
FLIGHTCODE
public static final int FLIGHTCODE
- See Also:
- Constant Field Values
FlightReportComparator
public FlightReportComparator(int comparisonType)
- Creates a new FlightReport comparator with a particular comparison type code.
- Parameters:
comparisonType - The criteria by which to compare
- Throws:
IllegalArgumentException - if the type is invalid- See Also:
AbstractComparator.setComparisonType(int)
FlightReportComparator
public FlightReportComparator(String typeName)
- Creates a new FlightReport comparator with a particular comparison type name.
- Parameters:
typeName - The criteria type name by which to compare
- Throws:
IllegalArgumentException - if the type name is invalid- See Also:
AbstractComparator.setComparisonType(String)
compareImpl
protected int compareImpl(FlightReport f1,
FlightReport f2)
- Compares two Flight Reports by the designated criterial.
- Specified by:
compareImpl in class AbstractComparator<FlightReport>
- Parameters:
f1 - The first object to comparef2 - 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 FlightReport bean- See Also:
Comparator.compare(Object, Object)
Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.