api/jar/src/main/java/javax/slee/facilities/AlarmLevel.java
public static AlarmLevel fromInt(int level) throws IllegalArgumentException {
        switch (level) {
            case LEVEL_CLEAR: return CLEAR;
            case LEVEL_CRITICAL: return CRITICAL;
            case LEVEL_MAJOR: return MAJOR;
            case LEVEL_WARNING: return WARNING;
            case LEVEL_INDETERMINATE: return INDETERMINATE;
            case LEVEL_MINOR: return MINOR;
            default: throw new IllegalArgumentException("Invalid level: " + level);
        }
    }
public static AlarmLevel fromInt(int level) throws IllegalArgumentException {
        switch (level) {
            case LEVEL_CLEAR: return CLEAR;
            case LEVEL_CRITICAL: return CRITICAL;
            case LEVEL_MAJOR: return MAJOR;
            case LEVEL_WARNING: return WARNING;
            case LEVEL_INDETERMINATE: return INDETERMINATE;
            case LEVEL_MINOR: return MINOR;
            default: throw new IllegalArgumentException("Invalid level: " + level);
        }
    }
public static AlarmLevel fromInt ( int level ) throws IllegalArgumentException { switch ( level ) { case LEVEL_CLEAR : return CLEAR ; case LEVEL_CRITICAL : return CRITICAL ; case LEVEL_MAJOR : return MAJOR ; case LEVEL_WARNING : return WARNING ; case LEVEL_INDETERMINATE : return INDETERMINATE ; case LEVEL_MINOR : return MINOR ; default : throw new IllegalArgumentException ( "Invalid level: " + level ) ; } }
Get an <code>AlarmLevel</code> object from an integer value.
@param level the level as an integer.
@return an <code>AlarmLevel</code> object corresponding to <code>level</code>.
@throws IllegalArgumentException if <code>level</code> is not a valid alarm
level value.
Get an <code > AlarmLevel< / code > object from an integer value .