【代码优化】IoT:设备下行实现前,相关代码的整理

This commit is contained in:
YunaiV
2025-01-30 07:48:28 +08:00
parent 911c8c7461
commit 5110948db8
25 changed files with 44 additions and 392 deletions

View File

@@ -33,17 +33,13 @@ public enum IotPluginDeployTypeEnum implements ArrayValuable<Integer> {
this.name = name;
}
public static IotPluginDeployTypeEnum fromDeployType(Integer deployType) {
public static IotPluginDeployTypeEnum valueOf(Integer deployType) {
return Arrays.stream(values())
.filter(value -> value.getDeployType().equals(deployType))
.findFirst()
.orElse(null);
}
public static boolean isValidDeployType(Integer deployType) {
return fromDeployType(deployType) != null;
}
@Override
public Integer[] array() {
return ARRAYS;