Class GateComparator
- All Implemented Interfaces:
Serializable, Comparator<Gate>
A comparator for airport Gates.
- Since:
- 5.1
- Version:
- 8.0
- Author:
- Luke
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intFields inherited from class AbstractComparator
_comparisonType, _typeNamesModifier and TypeFieldDescriptionprotected intThe criteria by which to compare objects.protected String[]Text descriptions of the different comparison types. -
Constructor Summary
ConstructorsConstructorDescriptionGateComparator(int comparisonType) Creates a new GateComparator with a given comparison type. -
Method Summary
Modifier and TypeMethodDescriptionintcompareImpl(Gate g1, Gate g2) Compares two gates by the designated criteria.Methods inherited from class AbstractComparator
compare, getComparisonType, getTypeNames, setComparisonType, setComparisonTypeModifier and TypeMethodDescriptionfinal intReturn the result by interrogating the implementation and applying a reverse sort if requred.intReturn the comparison type.String[]Return the list of comparison type names.voidsetComparisonType(int type) Sets the comparison type.voidsetComparisonType(String type) Sets the comparison type.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, max, min, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
NAME
public static final int NAME- See Also:
-
TYPENUMBER
public static final int TYPENUMBER- See Also:
-
USAGE
public static final int USAGE- See Also:
-
-
Constructor Details
-
GateComparator
public GateComparator(int comparisonType) Creates a new GateComparator with a given comparison type.- Parameters:
comparisonType- The criteria by which to compare- Throws:
IllegalArgumentException- if the type is invalid- See Also:
-
-
Method Details