cz.cuni.amis.pogamut.usar2004.agent.module.datatypes
Class ConfigContainer

Package class diagram package ConfigContainer
java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,Map<String,SuperConfiguration>>
          extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
ConfigContainer()
           
 
Method Summary
 SuperConfiguration getConfigurationByTypeName(String type, String name)
          Gets configuration message representatives from local hashmap specified by type and by name.
 List<SuperConfiguration> getConfigurationsByClass(Class c)
          Adds every object that can be casted to initial class to the output list.
 List<SuperConfiguration> getConfigurationsByConfigType(ConfigType type)
          Iterates through local hashmap values and seeks match.
 List<SuperConfiguration> getConfigurationsByType(String type)
          Gets configuration message representatives from local hashmap.
 List<MessageDescriptor> getNonEmptyDescription()
          For each type of Configuration it adds all individuals to the returnee List as a couple (Type, Name)
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

ConfigContainer

public ConfigContainer()
Method Detail

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.