Class OnlineStatsEntry
- All Implemented Interfaces:
Serializable
A bean to store online flight statistics entries.
- Since:
- 10.2
- Version:
- 10.3
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()Returns the statistics label.intReturns the total number of miles flown across all networks during this period.doubleReturns the total number of flight hours flown across all networks during this period.intReturns the total number of flight legs flown across all networks during this period.intReturns the total number of legs flown during this period.inthashCode()voidsetNetwork(OnlineNetwork net, int legs, int distance, double hours) Sets online network statistics.voidsetTotalLegs(int legs) Updates the total number of legs flown during this period.Methods inherited from class LegHoursStatsEntry
getDistance, getHours, getKeys, getLegs, getMaxKey, inc, setModifier and TypeMethodDescriptionintgetDistance(OnlineNetwork key) Returns the flight distance for a particular key.doublegetHours(OnlineNetwork key) Returns the number of flight hours for a particular key.getKeys()Returns tthe available keys.intgetLegs(OnlineNetwork key) Returns the number of flight legs for a particular key.protected OnlineNetworkReturns the maximum key value in this bean.protected voidinc(OnlineNetwork key, int distance, double hours) Adds to an existing statistics entry.protected voidset(OnlineNetwork key, int legs, int distance, double hours) Adds a statistics entry.
-
Constructor Details
-
OnlineStatsEntry
-
-
Method Details
-
getOnlineLegs
public int getOnlineLegs()Returns the total number of flight legs flown across all networks during this period.- Returns:
- the number of legs
-
getOnlineHours
public double getOnlineHours()Returns the total number of flight hours flown across all networks during this period.- Returns:
- the number of hours
-
getOnlineDistance
public int getOnlineDistance()Returns the total number of miles flown across all networks during this period.- Returns:
- the number of miles
-
getTotalLegs
public int getTotalLegs()Returns the total number of legs flown during this period.- Returns:
- the number of legs
-
getLabel
-
setNetwork
Sets online network statistics.- Parameters:
net- the OnlineNetworklegs- the number of legsdistance- the flight distance in mileshours- the number of hours
-
setTotalLegs
public void setTotalLegs(int legs) Updates the total number of legs flown during this period.- Parameters:
legs- the number of legs
-
hashCode
-