Class Controller
java.lang.Object
org.deltava.beans.servinfo.NetworkUser
org.deltava.beans.servinfo.ConnectedUser
org.deltava.beans.servinfo.Controller
- All Implemented Interfaces:
Serializable
,Comparable<NetworkUser>
,GeoLocation
,MapEntry
,MarkerMapEntry
,ViewEntry
A bean to store online Controller information.
- Since:
- 1.0
- Version:
- 11.2
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.deltava.beans.servinfo.NetworkUser
NetworkUser.Type
-
Field Summary
FieldsFields inherited from class org.deltava.beans.servinfo.ConnectedUser
_position
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
ConstructorsConstructorDescriptionController
(int id, OnlineNetwork net) Initializes the bean with a particular user ID. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a radio position for this Controller.int
compareTo
(Controller c2) Compares this user to another Controller by comparing the Network IDs and callsigns.final boolean
Returns the Controller's facility type code.Returns all of the radio frequencies for this Controller.Returns the Controller's communication frequency.Returns the icon color for this entry if displayed in a Google Map.Returns the text to display in this marker's infobox if displayed in a Google Map.Returns all of the radio positions for this Controller.int
getRange()
Returns the Controller's visibility range.final NetworkUser.Type
getType()
Returns the user type.boolean
Returns whether the Conrtoller has set a primary frequency.int
hashCode()
boolean
Returns whether the controller is an Observer.void
setCallsign
(String cs) Updates the user's callsign.void
setFacility
(Facility ft) Sets the Controller's facility type.final void
Updates the network user's name, stripping off the home airport.void
setRange
(int rng) Updates the Controller's visibility range.Methods inherited from class org.deltava.beans.servinfo.ConnectedUser
getCallsign, getLatitude, getLoginTime, getLongitude, getPosition, getServer, hasLocation, setLoginTime, setPosition, setServer
Methods inherited from class org.deltava.beans.servinfo.NetworkUser
compareTo, getFirstName, getID, getLastName, getName, getNetwork, getPilotID, getRating, getRowClassName, setFirstName, setLastName, setPilotID, setRating, 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
-
OBS_FREQ
-
-
Constructor Details
-
Controller
Initializes the bean with a particular user ID.- Parameters:
id
- the user IDnet
- the OnlineNetwork
-
-
Method Details
-
getType
Description copied from class:NetworkUser
Returns the user type.- Specified by:
getType
in classNetworkUser
- Returns:
- the Type
-
getFrequency
Returns the Controller's communication frequency.- Returns:
- the frequency
- See Also:
-
getFacility
Returns the Controller's facility type code.- Returns:
- the facility code
- See Also:
-
getRange
public int getRange()Returns the Controller's visibility range.- Returns:
- the range in miles
- See Also:
-
getRadios
Returns all of the radio positions for this Controller.- Returns:
- a Collection of RadioPosition beans
-
getFrequencies
Returns all of the radio frequencies for this Controller.- Returns:
- a Collection of frequencies
-
addPosition
Adds a radio position for this Controller.- Parameters:
rp
- a RadioPosition
-
setName
Description copied from class:NetworkUser
Updates the network user's name, stripping off the home airport.- Overrides:
setName
in classNetworkUser
- Parameters:
name
- the user name- See Also:
-
setCallsign
Description copied from class:ConnectedUser
Updates the user's callsign.- Overrides:
setCallsign
in classConnectedUser
- Parameters:
cs
- the callsign- See Also:
-
setFacility
Sets the Controller's facility type.- Parameters:
ft
- the Facility- See Also:
-
setRange
public void setRange(int rng) Updates the Controller's visibility range.- Parameters:
rng
- the range in miles- See Also:
-
isObserver
public boolean isObserver()Returns whether the controller is an Observer.- Returns:
- TRUE if the Controller has an Observer rating or _OBS callsign
-
hasFrequency
public boolean hasFrequency()Returns whether the Conrtoller has set a primary frequency.- Returns:
- TRUE if a frequency has been set, otherwise FALSE
- See Also:
-
getIconColor
Description copied from interface:MarkerMapEntry
Returns the icon color for this entry if displayed in a Google Map.- Returns:
- the icon color
-
compareTo
Compares this user to another Controller by comparing the Network IDs and callsigns.- Parameters:
c2
- the Controller- Returns:
- TRUE if the IDs and Callsigns are equal, otherwise FALSE
-
equals
- Overrides:
equals
in classNetworkUser
-
hashCode
public int hashCode()- Overrides:
hashCode
in classNetworkUser
-
getInfoBox
-