org.rhq.core.domain.event
Enum EventSeverity

java.lang.Object
  extended by java.lang.Enum<EventSeverity>
      extended by org.rhq.core.domain.event.EventSeverity
All Implemented Interfaces:
Serializable, Comparable<EventSeverity>

public enum EventSeverity
extends Enum<EventSeverity>

The severity of an Event. Values are ordered from least to most severe.


Enum Constant Summary
DEBUG
           
ERROR
           
FATAL
           
INFO
           
WARN
           
 
Method Summary
 int getOrdinal()
          Getter for use in JSP pages
 EventSeverity[] getValues()
           
 boolean isAtLeastAsSevereAs(EventSeverity other)
          Determine if this severity is at least as severe as that of other
 boolean isMoreSevereThan(EventSeverity other)
          Determine if this severity is more severe than that of other
 String toString()
           
static EventSeverity valueOf(String name)
          Returns the enum constant of this type with the specified name.
static EventSeverity[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DEBUG

public static final EventSeverity DEBUG

INFO

public static final EventSeverity INFO

WARN

public static final EventSeverity WARN

ERROR

public static final EventSeverity ERROR

FATAL

public static final EventSeverity FATAL
Method Detail

values

public static EventSeverity[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (EventSeverity c : EventSeverity.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EventSeverity valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isMoreSevereThan

public boolean isMoreSevereThan(EventSeverity other)
Determine if this severity is more severe than that of other

Parameters:
other - EventSeverity to compare
Returns:
if more severe

isAtLeastAsSevereAs

public boolean isAtLeastAsSevereAs(EventSeverity other)
Determine if this severity is at least as severe as that of other

Parameters:
other - EventSeverity to compare
Returns:
if at least as severe

getOrdinal

public int getOrdinal()
Getter for use in JSP pages

Returns:
the same value as Enum.ordinal()

getValues

public EventSeverity[] getValues()

toString

public String toString()
Overrides:
toString in class Enum<EventSeverity>


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.