org.jscience.util.logging
Class Level

java.lang.Object
  extended by org.jscience.util.logging.Level
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Level>

public class Level
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<Level>

Level classifies the logging of LogEntry objects. The implementation is inspired by java.util.logging, but simpler.

See Also:
LogEntry, Logger, Serialized Form

Field Summary
static Level BEGIN
          DOCUMENT ME!
static Level COMMENT
          DOCUMENT ME!
static Level CONFIG
          DOCUMENT ME!
static Level DEBUG
          DOCUMENT ME!
static Level DEFAULT
          used when no other level was given
static Level END
          DOCUMENT ME!
static Level ERROR
          DOCUMENT ME!
static Level EXCEPTION
          DOCUMENT ME!
static Level FAILURE
          DOCUMENT ME!
static Level FINE
          DOCUMENT ME!
static Level FINER
          DOCUMENT ME!
static Level FINEST
          DOCUMENT ME!
static Level IMPORTANT
          DOCUMENT ME!
static Level INFO
          DOCUMENT ME!
static Level NORMAL
          DOCUMENT ME!
static Level SEVERE
          DOCUMENT ME!
static Level SUCCESS
          DOCUMENT ME!
static Level WARNING
          DOCUMENT ME!
 
Constructor Summary
protected Level(java.lang.String text, int compareValue)
           
 
Method Summary
 int compareTo(Level l)
          provides a simple way to order Levels by their assumed importance.
 boolean equals(java.lang.Object obj)
          DOCUMENT ME!
static Level forName(java.lang.String name)
          returns the level corresponding to the given name.
 int getImportance()
          returns the value the natural order is based on
static Level[] getKnownLevels()
          DOCUMENT ME!
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT

public static final Level DEFAULT
used when no other level was given


NORMAL

public static final Level NORMAL
DOCUMENT ME!


CONFIG

public static final Level CONFIG
DOCUMENT ME!


BEGIN

public static final Level BEGIN
DOCUMENT ME!


END

public static final Level END
DOCUMENT ME!


SUCCESS

public static final Level SUCCESS
DOCUMENT ME!


FAILURE

public static final Level FAILURE
DOCUMENT ME!


DEBUG

public static final Level DEBUG
DOCUMENT ME!


EXCEPTION

public static final Level EXCEPTION
DOCUMENT ME!


FINE

public static final Level FINE
DOCUMENT ME!


FINER

public static final Level FINER
DOCUMENT ME!


FINEST

public static final Level FINEST
DOCUMENT ME!


INFO

public static final Level INFO
DOCUMENT ME!


ERROR

public static final Level ERROR
DOCUMENT ME!


SEVERE

public static final Level SEVERE
DOCUMENT ME!


WARNING

public static final Level WARNING
DOCUMENT ME!


IMPORTANT

public static final Level IMPORTANT
DOCUMENT ME!


COMMENT

public static final Level COMMENT
DOCUMENT ME!

Constructor Detail

Level

protected Level(java.lang.String text,
                int compareValue)
Parameters:
text - must not be null
Method Detail

getKnownLevels

public static Level[] getKnownLevels()
DOCUMENT ME!

Returns:
DOCUMENT ME!

forName

public static Level forName(java.lang.String name)
returns the level corresponding to the given name. If the level is not known, a level named 'Special Level (name)' is returned.

Parameters:
name - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.RuntimeException - DOCUMENT ME!

getImportance

public int getImportance()
returns the value the natural order is based on

Returns:
DOCUMENT ME!

compareTo

public int compareTo(Level l)
provides a simple way to order Levels by their assumed importance.

Specified by:
compareTo in interface java.lang.Comparable<Level>
Parameters:
l - DOCUMENT ME!
Returns:
DOCUMENT ME!

equals

public boolean equals(java.lang.Object obj)
DOCUMENT ME!

Overrides:
equals in class java.lang.Object
Parameters:
obj - DOCUMENT ME!
Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!