You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
621 B
29 lines
621 B
/**
|
|
* 温度控制接口
|
|
* 定义了所有需要温度控制的设备必须实现的功能
|
|
*/
|
|
public interface TemperatureControl {
|
|
/**
|
|
* 设置温度
|
|
* @param temperature 温度值
|
|
*/
|
|
void setTemperature(double temperature);
|
|
|
|
/**
|
|
* 获取当前温度
|
|
* @return 当前温度
|
|
*/
|
|
double getTemperature();
|
|
|
|
/**
|
|
* 增加温度
|
|
* @param increment 增加的温度值
|
|
*/
|
|
void increaseTemperature(double increment);
|
|
|
|
/**
|
|
* 减少温度
|
|
* @param decrement 减少的温度值
|
|
*/
|
|
void decreaseTemperature(double decrement);
|
|
} |