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.

33 lines
624 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/**
* 灯光控制接口
* 定义了所有灯光设备必须实现的功能
*/
public interface LightControl {
/**
* 打开灯光
*/
void turnOnLight();
/**
* 关闭灯光
*/
void turnOffLight();
/**
* 设置灯光亮度
* @param brightness 亮度值0-100
*/
void setBrightness(int brightness);
/**
* 设置灯光颜色
* @param color 颜色值(如"white", "red", "blue"等)
*/
void setColor(String color);
/**
* 检查灯光是否开启
* @return 是否开启
*/
boolean isLightOn();
}