sk.uniba.euromath.gene.messages
Enum MessageSeverityEnum

java.lang.Object
  extended by java.lang.Enum<MessageSeverityEnum>
      extended by sk.uniba.euromath.gene.messages.MessageSeverityEnum
All Implemented Interfaces:
Serializable, Comparable<MessageSeverityEnum>

public enum MessageSeverityEnum
extends Enum<MessageSeverityEnum>

Message severity constants.

Author:
Martin Vysny

Enum Constant Summary
ERROR
          Error message, export result may not be correct.
FATAL
          Fatal error message, we should bail out as fast as possible.
INFO
          An information message.
WARNING
          Warning message.
 
Method Summary
abstract  int getEclipseSeverity()
          Returns severity as an Eclipse constant (one of IStatus constants).
abstract  boolean isError()
          Checks if this severity contants denotes an error.
static MessageSeverityEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MessageSeverityEnum valueOfDomError(short severity)
          Returns appropriate enum constant
static MessageSeverityEnum valueOfEclipseSeverity(int severity)
          Returns appropriate enum constant
static MessageSeverityEnum[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INFO

public static final MessageSeverityEnum INFO
An information message.


WARNING

public static final MessageSeverityEnum WARNING
Warning message.


ERROR

public static final MessageSeverityEnum ERROR
Error message, export result may not be correct.


FATAL

public static final MessageSeverityEnum FATAL
Fatal error message, we should bail out as fast as possible.

Method Detail

values

public static final MessageSeverityEnum[] 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(MessageSeverityEnum c : MessageSeverityEnum.values())
        System.out.println(c);

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

valueOf

public static MessageSeverityEnum 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

getEclipseSeverity

public abstract int getEclipseSeverity()
Returns severity as an Eclipse constant (one of IStatus constants).

Returns:
Eclipse severity, useful for logging purposes.

isError

public abstract boolean isError()
Checks if this severity contants denotes an error.

Returns:
true if this contants is an error.

valueOfDomError

public static MessageSeverityEnum valueOfDomError(short severity)
Returns appropriate enum constant

Parameters:
severity -
Returns:
the enum constant or null if invalid severity was passed in.

valueOfEclipseSeverity

public static MessageSeverityEnum valueOfEclipseSeverity(int severity)
Returns appropriate enum constant

Parameters:
severity - the eclipse severity, one of IStatus constants.
Returns:
the enum constant or null if invalid severity was passed in.


Copyright 2003-2003-2006 null. All Rights Reserved.