
com.zhuang.fileupload.enums.CommonStatus Maven / Gradle / Ivy
The newest version!
package com.zhuang.fileupload.enums;
import java.util.Arrays;
public enum CommonStatus {
ENABLE(1,"已启用"),
DISABLE(0,"已禁用"),
DELETED(-1,"已删除");
private Integer value;
private String name;
CommonStatus(Integer value, String name){
this.value=value;
this.name=name;
}
public Integer getValue(){
return this.value;
}
public String getName(){
return this.name;
}
public static CommonStatus getByValue(Integer value){
return Arrays.stream(CommonStatus.values()).filter(c -> c.getValue().equals(value)).findFirst().orElse(null);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy