Class NavigationDataMap
java.lang.Object
org.deltava.beans.navdata.NavigationDataMap
- All Implemented Interfaces:
Serializable
,Cacheable
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty NavigationDataMap bean.NavigationDataMap
(Collection<NavigationDataBean> entries) Creates a pre-populaed NavigationDataMap bean. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a navigation aid to the map.cacheKey()
Returns the cache key for this object.boolean
Returns if the Map contains at least one Navigation Data bean with a particular code.void
filter
(Collection<Navaid> types) Filters out navigation aids based on their type.Returns a Navigation Aid with a given code.get
(String code, GeoLocation loc) Returns a Navigation Aid with a given code.getAll()
Returns all navigation aid beans contained within this object.getEntries
(String code) Returns all entries with a given code.boolean
isEmpty()
Returns whether the map is empty.void
setCacheKey
(Object key) Sets this bean's cache key.
-
Constructor Details
-
NavigationDataMap
public NavigationDataMap()Creates an empty NavigationDataMap bean. -
NavigationDataMap
Creates a pre-populaed NavigationDataMap bean.- Parameters:
entries
- the navigation aid beans to add
-
-
Method Details
-
contains
Returns if the Map contains at least one Navigation Data bean with a particular code.- Parameters:
code
- the code- Returns:
- TRUE if at least one bean with this code is contained within the map, otherwise FALSE
-
getEntries
Returns all entries with a given code.- Parameters:
code
- the navigation aid code- Returns:
- a SortedSet of entries, which may be empty
-
get
Returns a Navigation Aid with a given code. If more than one navigation aid exists with this code, then the first NavigationDataBean (using the class' native sorting) is returned.- Parameters:
code
- the navigation aid code- Returns:
- a NavigationDataBean, or null if not found
- See Also:
-
get
Returns a Navigation Aid with a given code. If more than one navigation aid exists with this code, then the closes navigation aid to the specified fixed point is returned.- Parameters:
code
- the navigation aid codeloc
- the reference location- Returns:
- a NavigationDataBean, or null if not found
- See Also:
-
getAll
Returns all navigation aid beans contained within this object.- Returns:
- a Collection of NavigationDataBeans
-
isEmpty
public boolean isEmpty()Returns whether the map is empty.- Returns:
- TRUE if the object is empty, otherwise FALSE
-
filter
Filters out navigation aids based on their type.- Parameters:
types
- a Collection of Integers with navigation aid type codes- See Also:
-
setCacheKey
Sets this bean's cache key. This is typically the query object used to generate this map.- Parameters:
key
- the cache key
-
cacheKey