cz.cuni.amis.pogamut.usar2004.agent.module.datatypes
Class ConfigContainer
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Map<String,SuperConfiguration>>
cz.cuni.amis.pogamut.usar2004.agent.module.datatypes.ConfigContainer
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,Map<String,SuperConfiguration>>
public class ConfigContainer
- extends HashMap<String,Map<String,SuperConfiguration>>
Container of configuration message representatives. It is basicly a hashmap
of maps. There is geometry messages logged by type and than by name.
- Author:
- vejmanm
- See Also:
- Serialized Form
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
ConfigContainer
public ConfigContainer()
getConfigurationsByType
public List<SuperConfiguration> getConfigurationsByType(String type)
- Gets configuration message representatives from local hashmap. Returns
null if none matches or this hash map is empty.
- Parameters:
type
- String representing the type of Configuration to return
- Returns:
- Returns List of specified type of Configuration representatives.
getConfigurationsByConfigType
public List<SuperConfiguration> getConfigurationsByConfigType(ConfigType type)
- Iterates through local hashmap values and seeks match. Returns null if
this hash map is empty. Note, that if type = UNKNOWN_Configuration
it returns all unknown Configurations.
- Parameters:
type
- ConfigurationType representing the type of Configuration to
return
- Returns:
- Returns List of all Configurations that suit input
ConfigurationType.
getConfigurationsByClass
public List<SuperConfiguration> getConfigurationsByClass(Class c)
- Adds every object that can be casted to initial class to the output list.
Note that if You feed this method with SuperClass it will return all
available submodules.
- Parameters:
c
- Class representing the type of which the return list should be
- Returns:
- Returns a list of eligible objects, that can be casted to Class c
getConfigurationByTypeName
public SuperConfiguration getConfigurationByTypeName(String type,
String name)
- Gets configuration message representatives from local hashmap specified
by type and by name. Returns null if none matches or this hash map is
empty.
- Parameters:
type
- String representing the type of configuration to return.name
- String representing the name of configuration to return.
- Returns:
- Returns List of specified type of Configuration representative.
getNonEmptyDescription
public List<MessageDescriptor> getNonEmptyDescription()
- For each type of Configuration it adds all individuals to the returnee
List as a couple (Type, Name)
- Returns:
- returns Map of couples (Type/Name) of non empty Configurations
Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.