Interface EliteTotals
- All Known Implementing Classes:
EliteLevel, EliteLifetime, ElitePercentile, FlightEliteScore, RolloverYearlyTotal, YearlyTotal
public interface EliteTotals
An interface to describe beans that store Elite program totals.
- Since:
- 9.2
- Version:
- 12.4
- Author:
- Luke
-
Method Summary
Modifier and TypeMethodDescriptionstatic intcompare(EliteTotals et1, EliteTotals et2) Compares two EliteEotal beans by comparing their legs, distance and points.intReturns the distance flown.intgetLegs()Returns the number of flight legs.intReturns the number of Elite points.default booleanReturns if the distance flown is greater than zero.default booleanhasLegs()Returns if the number of flight lges is greater than zero.default booleanReturns if the number of Elite points is greater than zero.default booleanisZero()Returns if legs, distance and points are all zero.
-
Method Details
-
getLegs
int getLegs()Returns the number of flight legs.- Returns:
- the number of legs
-
getDistance
int getDistance()Returns the distance flown.- Returns:
- the distance in miles
-
getPoints
int getPoints()Returns the number of Elite points.- Returns:
- the number of points
-
isZero
default boolean isZero()Returns if legs, distance and points are all zero.- Returns:
- TRUE if all are zero, otherwise FALSE
-
hasLegs
default boolean hasLegs()Returns if the number of flight lges is greater than zero.- Returns:
- TRUE if the number of legs is greater than zero, otherwise FALSE
-
hasDistance
default boolean hasDistance()Returns if the distance flown is greater than zero.- Returns:
- TRUE if the distance is greater than zero, otherwise FALSE
-
hasPoints
default boolean hasPoints()Returns if the number of Elite points is greater than zero.- Returns:
- TRUE if the number of points is greater than zero, otherwise FALSE
-
compare
Compares two EliteEotal beans by comparing their legs, distance and points.- Parameters:
et1- the first EliteTotals beanet2- the second EliteTotals bean- Returns:
- a comparison result
-