|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<String,Map<String,Queue<SuperSensor>>>
cz.cuni.amis.pogamut.usar2004.agent.module.datatypes.SensorsContainerQueued
public class SensorsContainerQueued
Container of sensor message representatives. Note that this is equvalent with SensorsContainer. The difference is that the Queued version does not throw out records until it is requiered to do so. It lines them up to lists. This is needed when we want the best quality readings and regular ticks are not enough to keep up with the speed of sensor messages being recieved.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
Constructor Summary | |
---|---|
SensorsContainerQueued()
|
Method Summary | |
---|---|
List<MessageDescriptor> |
getNonEmptyDescription()
For each type of sensor it adds all individuals to the returnee List as a couple (Type, Name) |
List<SuperSensor> |
getSensorByTypeName(String type,
String name)
Gets sensor message representatives from local hashmap specified by type and by name. |
List<SuperSensor> |
getSensorsByClass(Class c)
Adds every object that can be casted to initial class to the output list. |
List<SuperSensor> |
getSensorsBySensorType(SensorType type)
Iterates through local hashmap values and seeks match. |
List<SuperSensor> |
getSensorsByType(String type)
Gets sensor message representatives from local hashmap. |
boolean |
isReady(SensorType type)
Iterates through local hashmap and seeks for the specified sensor type. |
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 |
---|
public SensorsContainerQueued()
Method Detail |
---|
public List<SuperSensor> getSensorsByType(String type)
type
- String representing the type of sensor to return.
public List<SuperSensor> getSensorsBySensorType(SensorType type)
type
- SensorType representing the type of sensor to return.
public List<SuperSensor> getSensorsByClass(Class c)
c
- Class representing the type of which the return list should be.
public List<SuperSensor> getSensorByTypeName(String type, String name)
type
- String representing the type of sensor to return.name
- String representing the name of sensor to return.
public List<MessageDescriptor> getNonEmptyDescription()
public boolean isReady(SensorType type)
type
- SensorType is the type of sensor we want to be able to work
with.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |