sg.edu.nus.logging
Enum LogEventType

java.lang.Object
  extended by java.lang.Enum<LogEventType>
      extended by sg.edu.nus.logging.LogEventType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<LogEventType>

public enum LogEventType
extends java.lang.Enum<LogEventType>

Define the event type, namely Error, Information, and Warning.

Version:
1.0 2006-6-22
Author:
Xu Linhao

Enum Constant Summary
ERROR
           
INFORMATION
           
WARNING
           
 
Method Summary
static boolean checkValue(java.lang.String eventType)
          Check if the event type exists.
 java.lang.String getValue()
          Get the value of the event type.
static java.lang.String getValue(java.lang.String eventType)
          Get the value of the event type.
static LogEventType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static LogEventType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ERROR

public static final LogEventType ERROR

WARNING

public static final LogEventType WARNING

INFORMATION

public static final LogEventType INFORMATION
Method Detail

values

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

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

valueOf

public static LogEventType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getValue

public java.lang.String getValue()
Get the value of the event type.

Returns:
the value of the event type

getValue

public static java.lang.String getValue(java.lang.String eventType)
Get the value of the event type.

Parameters:
eventType - the type of the event
Returns:
the value of the event type

checkValue

public static boolean checkValue(java.lang.String eventType)
Check if the event type exists.

Parameters:
eventType - the event type
Returns:
true if exists; otherwise, false