fromValue static method
- int value
Creates an enumeration value from int. param value The int value. return The created DocumentFormat.
Implementation
static DocumentFormat fromValue(int value) {
switch (value) {
case 0:
return DocumentFormat.unknown;
case 1:
return DocumentFormat.a4;
case 2:
return DocumentFormat.id1;
case 3:
return DocumentFormat.id2;
case 4:
return DocumentFormat.id3;
default:
throw Exception("Unable to find the specified enum value for $value");
}
}