|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--mil.af.afit.router.Vehicle
A vehicle travels to the sites that it can service based on the vehicle's capabilities and the sites' requirements. By default a vehicle leaves from and returns to its home base, but it can also leave from an "alternate location" in which case it will start there and return to its home base.
Site
,
Base
, Serialized FormConstructor Summary | |
Vehicle()
Constructs a vehicle with default values. |
|
Vehicle(java.lang.String name)
Constructs a vehicle with the specified name |
|
Vehicle(java.lang.String name,
int speed)
Constructs a vehicle with the specified name and speed |
|
Vehicle(Vehicle copyThis)
Constructs a vehicle copied from the specified vehicle |
Method Summary | |
void |
addSupportedRequirementType(java.lang.String reqType)
Adds a requirement type to the list of vehicle capabilities. |
void |
determineHomeBaseFromList(BaseList list)
Determines a base object from the home base named stored during serialization. |
double |
getAlternateLatitude()
Returns the vehicle's alternate starting latitude. |
double |
getAlternateLongitude()
Returns the vehicle's alternate starting longitude. |
int |
getAltitude()
Returns the vehicle's altitude (in feet). |
int |
getEarliestStartTime()
Returns the earliest time when the vehicle is available for takeoff. |
double |
getEndingLatitude()
Returns the vehicle's ending latitude. |
double |
getEndingLongitude()
Returns the vehicle's ending longitude. |
Base |
getHomeBase()
Returns the vehicle's home base. |
java.lang.String |
getName()
Returns the vehicle's name. |
int |
getPriority()
Returns the vehicle's priority. |
int |
getRange()
Returns the vehicle's range (in minutes). |
int |
getSpeed()
Returns the vehicle's speed (in knots). |
double |
getStartingLatitude()
Returns the vehicle's starting latitude. |
double |
getStartingLongitude()
Returns the vehicle's starting longitude. |
java.lang.String[] |
getSupportedRequirementTypes()
Returns the vehicle's supported requirement types. |
boolean |
isAtHome()
Returns whether or not the vehicle is currently at its home base. |
boolean |
isEnabled()
Returns whether or not the vehicl is enabled. |
void |
removeSupportedRequirementType(java.lang.String reqType)
Removes a requirement type from the list of vehicle capabilities. |
void |
setAlternateLatitude(double altLat)
Sets the vehicle's alternate latitude. |
void |
setAlternateLongitude(double altLong)
Sets the vehicle's alternate longitude. |
void |
setAltitude(int altitude)
Sets the vehicle's altitude (in feet). |
void |
setAtHome(boolean state)
Sets whether or not the vehicle is at its home base. |
void |
setEarliestStartTime(int time)
Sets the earliest time that the vehicle can take off. |
void |
setEnabled(boolean state)
Sets whether or not the vehicle is enabled. |
void |
setHomeBase(Base home)
Sets the vehicle's home base. |
void |
setHomeBaseName(java.lang.String name)
Sets the vehicle's home base name. |
void |
setHomeBaseName(java.lang.String name,
BaseList baseList)
Sets the vehicle's home base name. |
void |
setName(java.lang.String name)
Sets the vehicle's name. |
void |
setRange(int range)
Sets the vehicle's range (in minutes). |
void |
setSpeed(int speed)
Sets the vehicle's speed (in knots). |
void |
setSupportedRequirementTypes(java.lang.String[] reqTypes)
Adds the requirement types to the list of vehicle capabilities. |
boolean |
supportsRequirementType(java.lang.String reqType)
Returns whether or not the vehicle supports the requirement type. |
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 |
public Vehicle()
public Vehicle(java.lang.String name)
name
- vehicle namepublic Vehicle(java.lang.String name, int speed)
name
- vehicle namespeed
- vehicle speed (in knots)public Vehicle(Vehicle copyThis)
copyThis
- vehicle to copyMethod Detail |
public boolean isEnabled()
public final int getPriority()
public final java.lang.String getName()
public final Base getHomeBase()
public final double getAlternateLatitude()
public final double getAlternateLongitude()
public final double getStartingLatitude()
public final double getStartingLongitude()
public final double getEndingLatitude()
public final double getEndingLongitude()
public final boolean isAtHome()
public final int getEarliestStartTime()
public final int getSpeed()
public final int getRange()
public final java.lang.String[] getSupportedRequirementTypes()
public final int getAltitude()
public void setEnabled(boolean state)
state
- whether or not the vehicle is enabledpublic final void setName(java.lang.String name)
name
- the vehicle's namepublic final void setHomeBase(Base home)
name
- the vehicle's home basepublic final void setHomeBaseName(java.lang.String name)
name
- the vehicle's home base namepublic final void setHomeBaseName(java.lang.String name, BaseList baseList)
name
- the vehicle's home base namebaseList
- the base list to use for finding basespublic final void setAlternateLatitude(double altLat)
altLat
- the vehicle's alternate latitudepublic final void setAlternateLongitude(double altLong)
altLong
- the vehicle's alternate latitudepublic final void setAtHome(boolean state)
state
- whether or not the vehicle is at its home basepublic final void setEarliestStartTime(int time)
time
- the earliest time that the vehicle can take offpublic final void setRange(int range)
range
- the vehicle's range (in minutes).public final void setSpeed(int speed)
range
- the vehicle's speed (in knots).public final void setAltitude(int altitude)
range
- the vehicle's altitude (in feet).public final void addSupportedRequirementType(java.lang.String reqType)
reqType
- requirement type to add to capabilities listpublic final void setSupportedRequirementTypes(java.lang.String[] reqTypes)
reqTypes
- requirement types to add to capabilities listpublic final void removeSupportedRequirementType(java.lang.String reqType)
reqType
- requirement type to remove from capabilities listpublic final boolean supportsRequirementType(java.lang.String reqType)
reqType
- requirement type to checkpublic final void determineHomeBaseFromList(BaseList list)
list
- base list to search throughpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |