Class PilotComparator
- All Implemented Interfaces:
Serializable
,Comparator<Pilot>
A comparator for sorting Pilot objects.
- Since:
- 1.0
- Version:
- 9.0
- Author:
- Luke
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final String[]
Fields inherited from class org.deltava.comparators.PersonComparator
CREATED, FIRSTNAME, LASTLOGIN, LASTNAME
Fields inherited from class org.deltava.comparators.AbstractComparator
_comparisonType, _typeNames
-
Constructor Summary
ConstructorsConstructorDescriptionPilotComparator
(int comparisonType) Creates a new comparator with a specified comparison type code.PilotComparator
(String comparisonType) Creates a new comparator with a specified comparison type name. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
compareImpl
(Pilot p1, Pilot p2) This method does the actual comparison.Methods inherited from class org.deltava.comparators.AbstractComparator
compare, getComparisonType, getTypeNames, setComparisonType, setComparisonType
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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
PILOTCODE
public static final int PILOTCODE- See Also:
-
EQTYPE
public static final int EQTYPE- See Also:
-
RANK
public static final int RANK- See Also:
-
LEGS
public static final int LEGS- See Also:
-
HOURS
public static final int HOURS- See Also:
-
STATUS
public static final int STATUS- See Also:
-
LASTFLIGHT
public static final int LASTFLIGHT- See Also:
-
TYPES
-
-
Constructor Details
-
PilotComparator
public PilotComparator(int comparisonType) Creates a new comparator with a specified comparison type code.- Parameters:
comparisonType
- the comparison type code
-
PilotComparator
Creates a new comparator with a specified comparison type name.- Parameters:
comparisonType
- the comparison type name
-
-
Method Details
-
compareImpl
Description copied from class:AbstractComparator
This method does the actual comparison. It is called and then we modify the result if we are performing a reverse sort.- Overrides:
compareImpl
in classPersonComparator<Pilot>
- Parameters:
p1
- The first object to comparep2
- The second object to compare- Returns:
- -1, 0, 1 as defined by the compareTo(Object, Object) interface
- See Also:
-