Class RankComparator

java.lang.Object
org.deltava.comparators.RankComparator

public class RankComparator extends Object
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
  • Constructor Details

    • RankComparator

      public RankComparator()
  • Method Details

    • setRank1

      public void setRank1(Rank rank, int stage)
      Sets the first rank/stage pair.
      Parameters:
      rank - the rank
      stage - the stage
    • setRank2

      public void setRank2(Rank rank, int stage)
      Sets the second rank/stage pair.
      Parameters:
      rank - the rank
      stage - 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: