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

Package class diagram package GeometryContainer
java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,Map<String,SuperGeometry>>
          extended by cz.cuni.amis.pogamut.usar2004.agent.module.datatypes.GeometryContainer
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Map<String,SuperGeometry>>

public class GeometryContainer
extends HashMap<String,Map<String,SuperGeometry>>

Container of geometry 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
GeometryContainer()
           
 
Method Summary
 List<SuperGeometry> getGeometriesByClass(Class c)
          Adds every object that can be casted to initial class to the output list.
 List<SuperGeometry> getGeometriesByGeometryType(GeometryType type)
          Iterates through local hashmap values and seeks match.
 List<SuperGeometry> getGeometriesByType(String type)
          Gets geometry message representatives from local hashmap.
 SuperGeometry getGeometryByTypeName(String type, String name)
          Gets geometry message representatives from local hashmap specified by type and by name.
 List<MessageDescriptor> getNonEmptyDescription()
          For each type of Geometry 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

GeometryContainer

public GeometryContainer()
Method Detail

getGeometriesByType

public List<SuperGeometry> getGeometriesByType(String type)
Gets geometry message representatives from local hashmap. Returns null if none matches or this hash map is empty.

Parameters:
type - String representing the type of Geometry to return
Returns:
Returns List of specified type of Geometry representatives.

getGeometriesByGeometryType

public List<SuperGeometry> getGeometriesByGeometryType(GeometryType type)
Iterates through local hashmap values and seeks match. Returns null if this hash map is empty. Note, that if type = UNKNOWN_Geometry it returns all unknown Geometries.

Parameters:
type - GeometryType representing the type of Geometry to return
Returns:
Returns List of all Geometries that suit input GeometryType.

getGeometriesByClass

public List<SuperGeometry> getGeometriesByClass(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

getGeometryByTypeName

public SuperGeometry getGeometryByTypeName(String type,
                                           String name)
Gets geometry 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 geometry to return.
name - String representing the name of geometry to return.
Returns:
Returns List of specified type of Geometry representative.

getNonEmptyDescription

public List<MessageDescriptor> getNonEmptyDescription()
For each type of Geometry it adds all individuals to the returnee List as a couple (Type, Name)

Returns:
returns Map of couples (Type/Name) of non empty Geometries


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.