argos/dmp-backend/logging/src/main/java/types/LoggingType.java

34 lines
693 B
Java
Raw Normal View History

2018-06-05 10:18:01 +02:00
package types;
/**
* Created by ikalyvas on 5/30/2018.
*/
public enum LoggingType {
WARNING(0), ERROR(1), INFO(2), DEBUG(3);
private Integer value;
private LoggingType(Integer value) {
this.value = value;
}
public Integer getValue() {
return value;
}
public static LoggingType fromInteger(Integer value) {
switch (value) {
case 0:
return WARNING;
case 1:
return ERROR;
case 2:
return INFO;
case 3:
return DEBUG;
default:
throw new RuntimeException("Unsupported LoggingType");
}
}
}