Class ScheduleEntryComparator
java.lang.Object
org.deltava.comparators.AbstractComparator<ScheduleEntry>
org.deltava.comparators.ScheduleEntryComparator
- All Implemented Interfaces:
Serializable
,Comparator<ScheduleEntry>
A comparator for Schedule entries.
- Since:
- 4.1
- Version:
- 11.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 int
static final int
static final int
static final int
static final int
Fields inherited from class org.deltava.comparators.AbstractComparator
_comparisonType, _typeNames
-
Constructor Summary
ConstructorsConstructorDescriptionScheduleEntryComparator
(int comparisonType) Creates a new comparator with a given comparison type. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
compareImpl
(ScheduleEntry se1, ScheduleEntry se2) 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
-
FLIGHT
public static final int FLIGHT- See Also:
-
EQTYPE
public static final int EQTYPE- See Also:
-
ORIGIN
public static final int ORIGIN- See Also:
-
DEST
public static final int DEST- See Also:
-
DTIME
public static final int DTIME- See Also:
-
ATIME
public static final int ATIME- See Also:
-
LENGTH
public static final int LENGTH- See Also:
-
DISTANCE
public static final int DISTANCE- See Also:
-
FLCOUNT
public static final int FLCOUNT- See Also:
-
LASTFLT
public static final int LASTFLT- See Also:
-
FLIGHT_DTIME
public static final int FLIGHT_DTIME- See Also:
-
ROUTE_FLIGHT
public static final int ROUTE_FLIGHT- See Also:
-
-
Constructor Details
-
ScheduleEntryComparator
public ScheduleEntryComparator(int comparisonType) Creates a new comparator with a given comparison type.- Parameters:
comparisonType
- The criteria by which to compare- Throws:
IllegalArgumentException
- if the type is invalid- See Also:
-
-
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.- Specified by:
compareImpl
in classAbstractComparator<ScheduleEntry>
- Parameters:
se1
- The first object to comparese2
- The second object to compare- Returns:
- -1, 0, 1 as defined by the compareTo(Object, Object) interface
- See Also:
-