Class RouteStats
java.lang.Object
org.deltava.beans.schedule.AbstractRoute
org.deltava.beans.stats.RouteStats
- All Implemented Interfaces:
Comparable<RouteStats>, GeoLocation, MapEntry, RoutePair
A bean to store route frequency data.
- Since:
- 4.1
- Version:
- 11.0
- Author:
- Luke
-
Nested Class Summary
Nested classes/interfaces inherited from interface RoutePair
RoutePair.RoutePairImplModifier and TypeInterfaceDescriptionstatic classHelper class when all you need is a naked RoutePair. -
Field Summary
Fields inherited from class AbstractRoute
_frequencyFields inherited from interface GeoLocation
ALL, DEGREE_FEET, DEGREE_MILES, FEET_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE, RADIAN_MILESModifier and TypeFieldDescriptionstatic final intFormat the Longitude and Latitude.static final doubleSize of a degree in feet.static final doubleSize of a degree in miles.static final intSize of a mile in feet.static final String[]Latitude directions.static final intFormat the Latitude only.static final String[]Longitude directions.static final intFormat the Longitude only.static final intRadius of the Earth in miles.Fields inherited from interface MapEntry
BLUE, BROWN, COLORS, GREEN, GREY, ORANGE, PURPLE, RED, WHITE, YELLOWModifier and TypeFieldDescriptionstatic final StringBlue Google Maps icon, displayed as $static/img/maps/point_blue.pngstatic final StringBrown Google Maps icon, displayed as $static/img/maps/point_brown.pngstatic final String[]All Google Maps icon colors.static final StringGreen Google Maps icon, displayed as $static/img/maps/point_green.pngstatic final StringGrey Google Maps icon, displayed as $static/img/maps/point_grey.pngstatic final StringOrange Google Maps icon, displayed as $static/img/maps/point_orange.pngstatic final StringPurple Google Maps icon, displayed as $static/img/maps/point_purple.pngstatic final StringRed Google Maps icon, displayed as $static/img/maps/point_red.pngstatic final StringWhite Google Maps icon, displayed as $static/img/maps/point_white.pngstatic final StringYellow Google Maps icon, displayed as $static/img/maps/point_yellow.png -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int flights, int acarsFlights) Adds flights.intcompareTo(RouteStats rs2) intReturns the number of ACARS flight legs.Returns the last flight date for this route pair.voidsetLastFlight(Instant dt) Updates the date/time of the last flight.Methods inherited from class AbstractRoute
getAirportA, getAirportD, getFlights, getInfoBox, getLatitude, getLongitude, hashCode, toStringModifier and TypeMethodDescriptionReturns the arrival Airport.Returns the departure Airport.intReturns the number of flights in this route pair.Returns the text to display in this marker's infobox if displayed in a Google Map.doubleReturns the latitude of this location.doubleReturns the longitude of this location.inthashCode()toString()Methods inherited from class Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface GeoLocation
distanceFeet, distanceToModifier and TypeMethodDescriptiondefault intCalculates the distance between two points in feet.default intCalculates the distance between two GeoLocations.Methods inherited from interface RoutePair
createKey, getAirports, getDistance, getFlightType, includes, isPopulated, matches, midPointModifier and TypeMethodDescriptiondefault StringReturns a key that describes the route pair.Returns the airports in this Route Pair.default intReturns the distance between the Airports.default FlightTypeReturns the flight type for customs/gate purposes.default booleanReturns whether this RoutePair includes a particular IATA or ICAO code.default booleanReturns whether both airports are populated.default booleanReturns whether this RoutePair matches a particular Route Pair.default GeoLocationmidPoint()Returns the midpoint between the two Airports on a Great Circle route.
-
Constructor Details
-
RouteStats
-
-
Method Details
-
add
public void add(int flights, int acarsFlights) Adds flights.- Parameters:
flights- the total number of flightsacarsFlights- the number of ACARS flights
-
setLastFlight
Updates the date/time of the last flight.- Parameters:
dt- the date/time of the latest flight, or null if none
-
getACARSFlights
public int getACARSFlights()Returns the number of ACARS flight legs.- Returns:
- the number of ACARS legs
-
getLastFlight
Returns the last flight date for this route pair.- Returns:
- the last flight date/time, or null if none
-
compareTo
- Specified by:
compareToin interfaceComparable<RouteStats>
-