public static ErrPtg valueOf(int code) {switch(FormulaError.forInt(code)) {case DIV0: return DIV_ZERO;case NA: return N_A;case NAME: return NAME_INVALID;case NULL: return NULL_INTERSECTION;case NUM: return NUM_ERROR;case REF: return REF_INVALID;case VALUE: return VALUE_INVALID;default:throw new RuntimeException("Unexpected error code (" + code + ")");}}
public static ErrPtg ValueOf(int code){switch (code){case HSSFErrorConstants.ERROR_DIV_0: return DIV_ZERO;case HSSFErrorConstants.ERROR_NA: return N_A;case HSSFErrorConstants.ERROR_NAME: return NAME_INVALID;case HSSFErrorConstants.ERROR_NULL: return NULL_INTERSECTION;case HSSFErrorConstants.ERROR_NUM: return NUM_ERROR;case HSSFErrorConstants.ERROR_REF: return REF_INVALID;case HSSFErrorConstants.ERROR_VALUE: return VALUE_INVALID;}throw new InvalidOperationException("Unexpected error code (" + code + ")");}