- Type Parameters:
E
- Type of value which gets passed to event handlers.
- All Known Subinterfaces:
DigitalEventProvider<V>
- All Known Implementing Classes:
ButtonComponent
,PirMotionSensorComponent
,SoundSensorComponent
,TiltSensorComponent
,TouchSensorComponent
public interface SimpleEventProvider<E>
Generic simple event provider with empty default implementation.
Implementing this interface in a class allows mapping raw event values to simple events.
Each implementation is responsible for actually triggering the simple events within
dispatchSimpleEvents(Object)
.-
Method Summary
Modifier and TypeMethodDescriptiondefault void
dispatchSimpleEvents
(E value) Analyzes the given value passed by an event and triggers 0-n simple events based on it.
-
Method Details
-
dispatchSimpleEvents
Analyzes the given value passed by an event and triggers 0-n simple events based on it. This method allows mapping various value/state changes to simple events. Must be attached usingDigitalEventProvider.addListener(EventHandler)
.- Parameters:
value
- Event value
-