Android Open Source - Rejsekort-Reminder Abstract Sensor

From Project

Back to project page Rejsekort-Reminder.


The source code is released under:

GNU General Public License

If you think the Android project Rejsekort-Reminder listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.publictransportation.sensors;
/*ww w .j  ava2  s .co m*/
import com.example.publictransportation.modes.AbstractMode;

public abstract class AbstractSensor {
  protected AbstractMode parentMode;
  public AbstractSensor(AbstractMode parentMode) {
    this.parentMode = parentMode;
  // send data back to the parent transport mode
  // (this is called by whatever processes the derived non-abstract class launches)
  void output(String data) {
    parentMode.input(this, data);
    parentMode.log(this.getType(), this.getLabel(), data);
  // eventually called by the parent transport mode
  // this method shuts down all currently running sensor processes
  abstract public void kill();
  // needed for the state to properly ID the sensor
  abstract public SensorTypes getType();
  // a further subdivision after the type
  abstract public String getLabel();


Java Source Code List