cz.cuni.amis.pogamut.usar2004.agent.module.datatypes
Class StateContainer
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,SuperState>
cz.cuni.amis.pogamut.usar2004.agent.module.datatypes.StateContainer
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,SuperState>
public class StateContainer
- extends HashMap<String,SuperState>
Container of state particular state messages.
- 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 |
StateContainer
public StateContainer()
getStatesByType
public SuperState getStatesByType(String type)
- Gets state message representative from local hashmap. Returns null if
none matches.
- Parameters:
type - String representation of state type.
- Returns:
- Returns specific state message matching input string type
getStatesByVehicleType
public SuperState getStatesByVehicleType(VehicleType type)
- Iterates through local hashmap values and seeks match. Note that every
SuperState offspring has its own VehicleType property. Returns null if
none matches.
- Parameters:
type - VehicleType representation of state type - easier to use
since we don't have to watch after propper spelling.
- Returns:
- Returns specific state message matching input VehicleType
type
getStatesByClass
public List<SuperState> getStatesByClass(Class c)
- Iterates through local hahmap values and takes note of every SuperState
object that is Instance of specified class. Returns null if none matches
or c is null.
- Parameters:
c - c is class that the state message should extend, So when
SuperState is inserted as c, it should return list of all types of
vehicles that this holds data of.
- Returns:
- Returns list of state objects that implements class c
getAvailibleTypes
public List<String> getAvailibleTypes()
- Returns list of availible state object names.
- Returns:
- Returns list of availible state object names.
Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.