/** * Return the enum constant of this type with the specified numeric value. * * @param statusCode the numeric value of the enum to be returned * @return the enum constant with the specified numeric value * @throws IllegalArgumentException if this enum has no constant for the specified numeric value */ public static Status valueOf(final int statusCode) { Integer key = Integer.valueOf(statusCode); Status status = statusMap.get(key); return status == null? new Status(key, key.toString()) : status; } }
/** * Return the enum constant of this type with the specified numeric value. * * @param statusCode the numeric value of the enum to be returned * @return the enum constant with the specified numeric value * @throws IllegalArgumentException if this enum has no constant for the specified numeric value */ public static Status valueOf(final int statusCode) { Integer key = Integer.valueOf(statusCode); Status status = statusMap.get(key); return status == null? new Status(key, key.toString()) : status; } }