|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.deltava.beans.navdata.Airway
public class Airway
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.
| Field Summary |
|---|
| Fields inherited from interface org.deltava.beans.GeoLocation |
|---|
ALL, DEGREE_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE |
| Constructor Summary | |
|---|---|
Airway(String code,
int seq)
Creates a new Airway bean. |
|
| Method Summary | |
|---|---|
void |
addWaypoint(NavigationDataBean nd)
Adds a waypoint to the Airway route. |
Object |
cacheKey()
Returns the cache key. |
int |
compareTo(Airway a2)
Compares two airways by comparing their names and sequence numbers. |
boolean |
equals(Object o2)
|
String |
getCode()
Returns the airway code. |
double |
getLatitude()
Returns the latitude of the middle of the Airway. |
double |
getLongitude()
Returns the longitude of the middle of the Airway. |
String |
getRoute()
Returns the Airway route. |
int |
getSequence()
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. |
LinkedList<NavigationDataBean> |
getWaypoints()
Returns the waypoints for this Airway. |
List<NavigationDataBean> |
getWaypoints(String start,
String end)
Returns a subset of waypoints for this Airway between two waypoints. |
int |
hashCode()
|
boolean |
isHighLevel()
Returns if this Airway is a high-level Airway. |
boolean |
isLowLevel()
Returns if this Airway is a low-level Airway. |
void |
setCode(String code)
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. |
String |
toString()
Returns the airway code. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Airway(String code,
int seq)
code - the airway codeseq - the airway sequence code
NullPointerException - if code is null| Method Detail |
|---|
public String getCode()
public int getSequence()
public int getSize()
getSize in interface Routepublic boolean isLowLevel()
public boolean isHighLevel()
public LinkedList<NavigationDataBean> getWaypoints()
getWaypoints in interface RoutegetRoute(),
addWaypoint(NavigationDataBean)public double getLatitude()
getLatitude in interface GeoLocationpublic double getLongitude()
getLongitude in interface GeoLocation
public List<NavigationDataBean> getWaypoints(String start,
String end)
start - the starting waypoint codeend - the ending waypoint code
NullPointerException - if start or end are nullpublic String getRoute()
getRoute in interface Routepublic void addWaypoint(NavigationDataBean nd)
addWaypoint in interface Routend - the waypointgetWaypoints()public void setCode(String code)
code - the code
NullPointerException - if code is nullpublic void setLowLevel(boolean isLow)
isLow - TRUE if low-level, otherwise FALSEpublic void setHighLevel(boolean isHigh)
isHigh - TRUE if high-level, otherwise FALSEpublic int compareTo(Airway a2)
compareTo in interface Comparable<Airway>public boolean equals(Object o2)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic Object cacheKey()
cacheKey in interface Cacheable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||