api/jar/src/main/java/javax/slee/facilities/AlarmLevel.java
public static AlarmLevel fromString(String level) throws NullPointerException, IllegalArgumentException {
        if (level == null) throw new NullPointerException("level is null");
        if (level.equalsIgnoreCase(CLEAR_STRING)) return CLEAR;
        if (level.equalsIgnoreCase(CRITICAL_STRING)) return CRITICAL;
        if (level.equalsIgnoreCase(MAJOR_STRING)) return MAJOR;
        if (level.equalsIgnoreCase(WARNING_STRING)) return WARNING;
        if (level.equalsIgnoreCase(INDETERMINATE_STRING)) return INDETERMINATE;
        if (level.equalsIgnoreCase(MINOR_STRING)) return MINOR;
        throw new IllegalArgumentException("Invalid level: " + level);
    }
public static AlarmLevel fromString(String level) throws NullPointerException, IllegalArgumentException {
        if (level == null) throw new NullPointerException("level is null");
        if (level.equalsIgnoreCase(CLEAR_STRING)) return CLEAR;
        if (level.equalsIgnoreCase(CRITICAL_STRING)) return CRITICAL;
        if (level.equalsIgnoreCase(MAJOR_STRING)) return MAJOR;
        if (level.equalsIgnoreCase(WARNING_STRING)) return WARNING;
        if (level.equalsIgnoreCase(INDETERMINATE_STRING)) return INDETERMINATE;
        if (level.equalsIgnoreCase(MINOR_STRING)) return MINOR;
        throw new IllegalArgumentException("Invalid level: " + level);
    }
Get an <code>AlarmLevel</code> object from a string value.
@param level the level as a string, for example as returned by the {@link #toString()}
method (case insensitive).
@return an <code>AlarmLevel</code> object corresponding to <code>level</code>.
@throws NullPointerException if <code>level</code> is <code>null</code>.
@throws IllegalArgumentException if <code>level</code> is not a valid alarm
level string.