mil.af.afit.router
Class Base

java.lang.Object
  |
  +--java.util.Observable
        |
        +--mil.af.afit.router.Base
All Implemented Interfaces:
java.io.Serializable

public class Base
extends java.util.Observable
implements java.io.Serializable

A base is associated with vehicles as a way to determine where the vehicles leave from and return to. A vehicle may actual depart from a latitude and longitude other than that of the base, if the vehicle is designated as being "Not at home."

Since:
1.0
See Also:
BaseList, Vehicle, Serialized Form

Constructor Summary
Base()
          Constructs a base with a default untitled name and latitudes and longitude equal to zero.
Base(java.lang.String name, double latitude, double longitude)
          Constructs a base from a name and a latitude and longitude.
 
Method Summary
 double getLatitude()
          Returns the latitude of the base.
 double getLongitude()
          Returns the longitude of the base.
 java.lang.String getName()
          Returns the name of the base
 void setLatitude(double latitude)
          Sets the latitude of the base and notifies registered Observers.
 void setLongitude(double longitude)
          Sets the longitude of the base and notifies registered Observers.
 void setName(java.lang.String name)
          Sets the name of the base and notifies registered Observers.
 java.lang.String toString()
           
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Base

public Base(java.lang.String name,
            double latitude,
            double longitude)
Constructs a base from a name and a latitude and longitude. Latitudes and longitudes are degrees and fractions of degrees (not DDMMSS, for example) where positive is north and east.
Parameters:
name - Name of the base
latitude - Latitude of the base
longitude - Longitude of the base
Since:
1.0

Base

public Base()
Constructs a base with a default untitled name and latitudes and longitude equal to zero.
Since:
1.0
Method Detail

getName

public final java.lang.String getName()
Returns the name of the base
Returns:
name of base
Since:
1.0

getLatitude

public final double getLatitude()
Returns the latitude of the base. Positive is north.
Since:
1.0

getLongitude

public final double getLongitude()
Returns the longitude of the base. Positive is east.
Since:
1.0

setName

public final void setName(java.lang.String name)
Sets the name of the base and notifies registered Observers. The BaseList is registered as an Observer so listening for changes to the list will also alert you to changes in individual bases.
Since:
1.0
See Also:
BaseList, Observer

setLatitude

public final void setLatitude(double latitude)
Sets the latitude of the base and notifies registered Observers. The BaseList is registered as an Observer so listening for changes to the list will also alert you to changes in individual bases.
Since:
1.0
See Also:
BaseList, Observer

setLongitude

public final void setLongitude(double longitude)
Sets the longitude of the base and notifies registered Observers. The BaseList is registered as an Observer so listening for changes to the list will also alert you to changes in individual bases.
Since:
1.0
See Also:
BaseList, Observer

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object