|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Sensor<T>
The interface implemented by concrete sensors. A sensor is a container for a piece of data of a particular type, and exists in a hierarchical namespace. The name of the sensor is described as a set of tokens separated by dots.
SensorEvent| Method Summary | |
|---|---|
String |
getDescription()
Returns the description of the sensor, for display. |
String |
getName()
Returns the name of the sensor, in a dot-separated namespace. |
List<String> |
getNameParts()
Returns the constituent parts of the sensor name as a List. |
Class<? super T> |
getType()
Returns the Java Class for the sensor data. |
String |
getTypeName()
Returns the type of the sensor data, as a String representation of the class name. |
com.google.common.reflect.TypeToken<T> |
getTypeToken()
Returns the Guava TypeToken (including generics info) |
SensorEvent<T> |
newEvent(Entity entity,
T value)
Create a new SensorEvent object for a specific Entity and data point. |
| Method Detail |
|---|
Class<? super T> getType()
Class for the sensor data.
This returns a "super" of T only in the case where T is generified,
and in such cases it returns the Class instance for the unadorned T ---
i.e. for List
---
this is of course because there is no actual Class
> instance.
com.google.common.reflect.TypeToken<T> getTypeToken()
String getTypeName()
String representation of the class name.
(Useful for contexts where Type is not accessible.)
String getName()
List<String> getNameParts()
List.
String getDescription()
SensorEvent<T> newEvent(Entity entity,
T value)
SensorEvent object for a specific Entity and data point.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||