/** * Use this in place of valueOf. * * @param value * real value * @return InvalidInputErrorCode corresponding to the value * * @throws IllegalArgumentException * If the specified value does not map to one of the known values in this enum. */ public static InvalidInputErrorCode fromValue(String value) { if (value == null || "".equals(value)) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (InvalidInputErrorCode enumEntry : InvalidInputErrorCode.values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } }
/** * <p> * Code that indicates the type of error that is generated. * </p> * * @param inspectorErrorCode * Code that indicates the type of error that is generated. * @return Returns a reference to this object so that method calls can be chained together. * @see InvalidInputErrorCode */ public InvalidInputException withInspectorErrorCode(InvalidInputErrorCode inspectorErrorCode) { this.inspectorErrorCode = inspectorErrorCode.toString(); return this; }
/** * <p> * Code that indicates the type of error that is generated. * </p> * * @param inspectorErrorCode * Code that indicates the type of error that is generated. * @return Returns a reference to this object so that method calls can be chained together. * @see InvalidInputErrorCode */ public InvalidInputException withInspectorErrorCode(InvalidInputErrorCode inspectorErrorCode) { this.inspectorErrorCode = inspectorErrorCode.toString(); return this; }
/** * Use this in place of valueOf. * * @param value * real value * @return InvalidInputErrorCode corresponding to the value * * @throws IllegalArgumentException * If the specified value does not map to one of the known values in this enum. */ public static InvalidInputErrorCode fromValue(String value) { if (value == null || "".equals(value)) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (InvalidInputErrorCode enumEntry : InvalidInputErrorCode.values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } }