de.Android_Seminar.backend.impl
Class SensorMapping

java.lang.Object
  extended by de.Android_Seminar.backend.impl.SensorMapping

public class SensorMapping
extends java.lang.Object

This class maps android's sensors to SensorType and vice versa. If there is no corresponding mapping for a sensor, null is returned.

Author:
jonas

Constructor Summary
SensorMapping()
           
 
Method Summary
static int getAndroidSensor(SensorType sensor)
           
static SensorType getSensorType(Sensor sensor)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SensorMapping

public SensorMapping()
Method Detail

getSensorType

public static SensorType getSensorType(Sensor sensor)
Parameters:
sensor - a android's sensor
Returns:
the SensorType for the given android sensor, or null if there is no such corresponding sensor

getAndroidSensor

public static int getAndroidSensor(SensorType sensor)
Parameters:
sensor - a SensorType sensor
Returns:
the corresponding android sensor, or -2 if there is no such corresponding sensor