fromValue static method

LogItemType fromValue(
  1. int value
)

Creates an enumeration value from int. param value The int value. return The created LogItemType.

Implementation

static LogItemType fromValue(int value) {
    	switch (value) {
      	case 0:
        	return LogItemType.undefined;
      	case 1:
        	return LogItemType.information;
      	case 2:
        	return LogItemType.warning;
      	case 3:
        	return LogItemType.error;
      	case 4:
        	return LogItemType.debug;
    default:
        	throw Exception("Unable to find the specified enum value for $value");
    	}
  	}