stella.sensor
Interface Toggling

All Known Implementing Classes:
QuadraticBoard, SchmidtTrigger, SolarToggle, TriggerBoard, ValueToggle

public interface Toggling

An interface defining the capabilities to be used as a WeatherJudging helper class. The new sensor values are fed to the only method in the interface, which should, in turn, return a boolean, indicating if the added value is above (true) or below the toggle (false). All implementations of this interface should provide a constructor which takes a single string as an argument. It is within the implementing class's responsibility if it wants to take the history of measurements into account or not.

Please note that it is the weather sensor's responsibility to correctly interpret above the toggle as good or as bad weather.


Method Summary
 boolean addHit(double value)
          Adds one measurement.
 

Method Detail

addHit

boolean addHit(double value)
Adds one measurement. The boolean returned indicates the state of the toggle.