public class FilterManager extends Object implements org.lsst.ccs.framework.HasLifecycle
| Modifier and Type | Field and Description |
|---|---|
protected TreeMap<String,Filter> |
filtersMapByName
A map to store the filters that FCS manages.
|
| Constructor and Description |
|---|
FilterManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkFilterName(String filterName)
This method controls if the filter name given at the console by an operator
is correct.
|
boolean |
containsFilterID(int id)
Return true if a filterID is in the map.
|
boolean |
containsFilterName(String filterName)
return true if filterName is in FilterManager map.
|
Filter |
getFilterByID(int id)
Return Return filter which id is given as argument.
|
Filter |
getFilterByName(String filterName)
Return a filter which name is given as argument.
|
int |
getFilterID(String filterName) |
String |
getFilterNameByID(int id)
Return Return filter name which correspond to ID.
|
List<String> |
getFilterNames() |
List<String> |
getFilterNamesSortedByFilterID()
Returns a list of filter names.
|
TreeMap<Integer,Filter> |
getFiltersMapByID() |
TreeMap<String,Filter> |
getFiltersMapByName()
A getter for the Filters Map sorted by filter name.
|
void |
init() |
String |
toString() |
public TreeMap<String,Filter> getFiltersMapByName()
public void init()
init in interface org.lsst.ccs.framework.HasLifecyclepublic Filter getFilterByName(String filterName)
filterName - public int getFilterID(String filterName)
public Filter getFilterByID(int id)
id - public boolean containsFilterID(int id)
id - public boolean containsFilterName(String filterName)
filterName - @Command(type=QUERY, level=0, description="Return filter name which correspond to ID.") public String getFilterNameByID(int id)
id - public List<String> getFilterNamesSortedByFilterID()
protected void checkFilterName(String filterName)
filterName - IllegalArgumentException - in the following cases :
- the name is not a String,
- the name is unknown in the map filters,
- the name is known in the map filters, but the filter location is
unknown,
- the name is known in the map filters, but the filter is out of the
camera.Copyright © 2023 LSST. All rights reserved.