Class RankComparator
java.lang.Object
org.deltava.comparators.RankComparator
A Comparator to compare pilot rank/equipment program changes. This isn't a true comparator since it
doesn't implement
Comparator
, but it returns similar values.- Since:
- 1.0
- Version:
- 8.0
- Author:
- Luke
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RankComparator
public RankComparator()
-
-
Method Details
-
setRank1
Sets the first rank/stage pair.- Parameters:
rank
- the rankstage
- the stage
-
setRank2
Sets the second rank/stage pair.- Parameters:
rank
- the rankstage
- the stage
-
compare
public int compare()Compares the two rank/stage pairs.- Returns:
- -1 if the first is less than the second, 1 if the first is greater than the second, otherwise 0
- See Also:
-