public abstract class MotionSensorBase extends ObserveableComponentBase implements MotionSensor
Modifier and Type | Field and Description |
---|---|
protected Date |
lastInactivityTimestamp |
protected Date |
lastMotionTimestamp |
listeners
Constructor and Description |
---|
MotionSensorBase() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(MotionSensorListener... listener) |
Date |
getLastInactivityTimestamp() |
Date |
getLastMotionTimestamp() |
abstract boolean |
isMotionDetected() |
protected void |
notifyListeners(MotionSensorChangeEvent event) |
void |
removeListener(MotionSensorListener... listener) |
addListener, removeAllListeners, removeListener
clearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTag
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
removeAllListeners
clearProperties, getName, getProperties, getProperty, getProperty, getTag, hasProperty, removeProperty, setName, setProperty, setTag
protected Date lastMotionTimestamp
protected Date lastInactivityTimestamp
public Date getLastMotionTimestamp()
getLastMotionTimestamp
in interface MotionSensor
public Date getLastInactivityTimestamp()
getLastInactivityTimestamp
in interface MotionSensor
public abstract boolean isMotionDetected()
isMotionDetected
in interface MotionSensor
public void addListener(MotionSensorListener... listener)
addListener
in interface MotionSensor
public void removeListener(MotionSensorListener... listener)
removeListener
in interface MotionSensor
protected void notifyListeners(MotionSensorChangeEvent event)
Copyright © 2012–2014 Pi4J. All rights reserved.