Interface TemperatureListener

All Known Implementing Classes:
ThermostatModule
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TemperatureListener
An implementation of this can be registered with IHeatExchangerLogic.addTemperatureListener(TemperatureListener) to monitor changes in the heat exchanger's temperature. Take care to also call IHeatExchangerLogic.removeTemperatureListener(TemperatureListener) when the object that implements this goes out of scope, to avoid memory leaks.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onTemperatureChanged(double prevTemperature, double newTemperature)
    Called when the monitored heat exchanger's temperature changes.
  • Method Details

    • onTemperatureChanged

      void onTemperatureChanged(double prevTemperature, double newTemperature)
      Called when the monitored heat exchanger's temperature changes.
      Parameters:
      prevTemperature - the previous temperature
      newTemperature - the new temperature