fromValue static method

DocumentCategory fromValue(
  1. int value
)

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

Implementation

static DocumentCategory fromValue(int value) {
    	switch (value) {
      	case 0:
        	return DocumentCategory.unknown;
      	case 1:
        	return DocumentCategory.A;
      	case 2:
        	return DocumentCategory.B;
      	case 3:
        	return DocumentCategory.C;
      	case 4:
        	return DocumentCategory.D;
      	case 5:
        	return DocumentCategory.E;
      	case 6:
        	return DocumentCategory.F;
      	case 7:
        	return DocumentCategory.G;
      	case 8:
        	return DocumentCategory.H;
      	case 9:
        	return DocumentCategory.I;
      	case 10:
        	return DocumentCategory.J;
      	case 11:
        	return DocumentCategory.K;
      	case 12:
        	return DocumentCategory.L;
      	case 13:
        	return DocumentCategory.M;
      	case 14:
        	return DocumentCategory.P;
      	case 15:
        	return DocumentCategory.S;
      	case 16:
        	return DocumentCategory.T;
      	case 17:
        	return DocumentCategory.V;
      	case 18:
        	return DocumentCategory.W;
      	case 19:
        	return DocumentCategory.X;
    default:
        	throw Exception("Unable to find the specified enum value for $value");
    	}
  	}