Package org.deltava.beans.econ
Class RolloverYearlyTotal
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.econ.YearlyTotal
org.deltava.beans.econ.RolloverYearlyTotal
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Object>
,EliteTotals
,IDBean
,Cacheable
A bean to store yearly totals with rollover amounts.
- Since:
- 11.1
- Version:
- 11.2
- Author:
- Luke
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRollover
(int legs, int distance, int pts) Adds rollover totals.int
Returns the distance flown.int
getLegs()
Returns the number of flight legs.int
Returns the number of Elite points.Returns rollover totals for the year.void
merge
(YearlyTotal yt) Merges a yearly total into this bean.void
reset
(int year) Resets the totals.Methods inherited from class org.deltava.beans.econ.YearlyTotal
add, addLegs, adjust, cacheKey, delta, getYear, matches, matches, toString, wouldMatch
Methods inherited from class org.deltava.beans.DatabaseBean
compareTo, equals, getHexID, getID, hashCode, setID, validateID, validateID
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.deltava.beans.econ.EliteTotals
isZero
-
Constructor Details
-
RolloverYearlyTotal
public RolloverYearlyTotal(int year, int pilotID) Creates the bean- Parameters:
year
- the program yearpilotID
- the Pilot's Database ID
-
-
Method Details
-
getLegs
public int getLegs()Description copied from interface:EliteTotals
Returns the number of flight legs.- Specified by:
getLegs
in interfaceEliteTotals
- Overrides:
getLegs
in classYearlyTotal
- Returns:
- the number of legs
-
getDistance
public int getDistance()Description copied from interface:EliteTotals
Returns the distance flown.- Specified by:
getDistance
in interfaceEliteTotals
- Overrides:
getDistance
in classYearlyTotal
- Returns:
- the distance in miles
-
getPoints
public int getPoints()Description copied from interface:EliteTotals
Returns the number of Elite points.- Specified by:
getPoints
in interfaceEliteTotals
- Overrides:
getPoints
in classYearlyTotal
- Returns:
- the number of points
-
getRollover
-
addRollover
public void addRollover(int legs, int distance, int pts) Adds rollover totals.- Parameters:
legs
- the number of legsdistance
- the distancepts
- the points
-
merge
Merges a yearly total into this bean.- Parameters:
yt
- a YearlyTotal bean
-
reset
public void reset(int year) Description copied from class:YearlyTotal
Resets the totals.- Overrides:
reset
in classYearlyTotal
- Parameters:
year
- the new program year
-