Class Airway
java.lang.Object
org.deltava.beans.navdata.Airway
- All Implemented Interfaces:
Serializable
,Comparable<Airway>
,GeoLocation
,Route
,Cacheable
- Direct Known Subclasses:
OceanicTrack
,TerminalRoute
A bean to store Airway names and waypoint data. Since there can be multiple Airways across the world with the
same code, each intersection can be flagged as "end of sequence" deliniating the end of a particular airway sequence.
- Since:
- 1.0
- Version:
- 11.0
- Author:
- Luke
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected final LinkedList
<NavigationDataBean> Waypoints.Fields inherited from interface org.deltava.beans.GeoLocation
ALL, DEGREE_FEET, DEGREE_MILES, FEET_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE, RADIAN_MILES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a waypoint to the Airway route.cacheKey()
Returns the cache key for this object.int
boolean
Returns whether this Airway contains a particular waypoint.boolean
protected int
Finds a waypoint in this Airway.getCode()
Returns the airway code.double
Returns the latitude of the middle of the Airway.double
Returns the longitude of the middle of the Airway.getRoute()
Returns the Airway route.int
Returns the sequence number, used to differentiate airways with different locations but the same code.int
getSize()
Returns the number of waypoints in the airway.Returns the waypoints for this Airway.getWaypoints
(String start, String end) Returns a subset of waypoints for this Airway between two waypoints.int
hashCode()
boolean
Returns if this Airway is a high-level Airway.boolean
Returns if this Airway is a low-level Airway.void
Updates the Airway code.void
setHighLevel
(boolean isHigh) Marks this Airway as a high-level Airway.void
setLowLevel
(boolean isLow) Marks this Airway as a low-level Airway.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.deltava.beans.GeoLocation
distanceFeet, distanceTo
-
Field Details
-
_awseq
protected int _awseq -
_waypoints
Waypoints.
-
-
Constructor Details
-
Airway
Creates a new Airway bean.- Parameters:
code
- the airway codeseq
- the airway sequence code- Throws:
NullPointerException
- if code is null
-
-
Method Details
-
getCode
-
getSequence
public int getSequence()Returns the sequence number, used to differentiate airways with different locations but the same code.- Returns:
- the squence
-
getSize
-
isLowLevel
public boolean isLowLevel()Returns if this Airway is a low-level Airway.- Returns:
- TRUE if a low-level airway, otherwise FALSE
-
isHighLevel
public boolean isHighLevel()Returns if this Airway is a high-level Airway.- Returns:
- TRUE if a high-level airway, otherwise FALSE
-
getWaypoints
Returns the waypoints for this Airway. The returned collection is mutable.- Specified by:
getWaypoints
in interfaceRoute
- Returns:
- an ordered Collection of waypoints
- See Also:
-
getLatitude
public double getLatitude()Returns the latitude of the middle of the Airway.- Specified by:
getLatitude
in interfaceGeoLocation
- Returns:
- the latitude in degrees
-
getLongitude
public double getLongitude()Returns the longitude of the middle of the Airway.- Specified by:
getLongitude
in interfaceGeoLocation
- Returns:
- the longitude in degrees
-
find
Finds a waypoint in this Airway.- Parameters:
code
- the waypoint code- Returns:
- the offset within the waypoints, or -1 if not found
-
contains
Returns whether this Airway contains a particular waypoint.- Parameters:
code
- the waypoint code- Returns:
- TRUE if found, otherwise FALSE
-
getWaypoints
Returns a subset of waypoints for this Airway between two waypoints.- Parameters:
start
- the starting waypoint codeend
- the ending waypoint code- Returns:
- a List of waypoint codes
- Throws:
NullPointerException
- if start or end are null
-
getRoute
-
setCode
Updates the Airway code.- Parameters:
code
- the code- Throws:
NullPointerException
- if code is null
-
setLowLevel
public void setLowLevel(boolean isLow) Marks this Airway as a low-level Airway.- Parameters:
isLow
- TRUE if low-level, otherwise FALSE
-
setHighLevel
public void setHighLevel(boolean isHigh) Marks this Airway as a high-level Airway.- Parameters:
isHigh
- TRUE if high-level, otherwise FALSE
-
equals
-
hashCode
-
toString
-
cacheKey
-