TraceLevel
and AlarmLevel
.public final class Level extends Object implements Serializable
A singleton instance of each enumerated value is guaranteed (via an implementation
of readResolve()
- refer java.io.Serializable
),
so that equality tests using ==
are always evaluated correctly. (This
equality test is only guaranteed if this class is loaded in the application's boot class
path, rather than dynamically loaded at runtime.)
The levels in descending order are:
Modifier and Type | Field and Description |
---|---|
static Level |
CONFIG
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static Level |
FINE
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static Level |
FINER
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static Level |
FINEST
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static Level |
INFO
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static int |
LEVEL_CONFIG
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static int |
LEVEL_FINE
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static int |
LEVEL_FINER
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static int |
LEVEL_FINEST
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static int |
LEVEL_INFO
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static int |
LEVEL_OFF
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static int |
LEVEL_SEVERE
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static int |
LEVEL_WARNING
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static Level |
OFF
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static Level |
SEVERE
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
static Level |
WARNING
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Deprecated.
Compare this level for equality with another.
|
static Level |
fromInt(int level)
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
int |
hashCode()
Deprecated.
Get a hash code value for this level.
|
boolean |
isConfig()
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
boolean |
isFine()
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
boolean |
isFiner()
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
boolean |
isFinest()
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
boolean |
isHigherLevel(Level other)
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
boolean |
isMinor()
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
boolean |
isOff()
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
boolean |
isSevere()
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
boolean |
isWarning()
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
int |
toInt()
Deprecated.
Trace and alarm levels now defined in
TraceLevel and AlarmLevel . |
String |
toString()
Deprecated.
Get the textual representation of the Level object.
|
public static final int LEVEL_OFF
OFF
.public static final int LEVEL_SEVERE
SEVERE
.public static final int LEVEL_WARNING
WARNING
.public static final int LEVEL_INFO
INFO
.public static final int LEVEL_CONFIG
CONFIG
.public static final int LEVEL_FINE
FINE
.public static final int LEVEL_FINER
FINER
.public static final int LEVEL_FINEST
FINEST
.public static final Level OFF
public static final Level SEVERE
public static final Level WARNING
public static final Level INFO
public static final Level CONFIG
public static final Level FINE
public static final Level FINER
public static final Level FINEST
public static Level fromInt(int level) throws IllegalArgumentException
Level
object from an integer value.level
- the level as an integer.Level
object corresponding to level
.IllegalArgumentException
- if level
is not a valid
level value.public int toInt()
Level
object.Level
object.public boolean isOff()
This method is effectively equivalent to the conditional test:
(this == OFF)
, ie. the code:
if (level.isOff()) ...
is interchangeable with the code:
if (level == Level.OFF) ...
true
if this object represents the OFF level,
false
otherwise.public boolean isSevere()
This method is effectively equivalent to the conditional test:
(this == SEVERE)
, ie. the code:
if (level.isSevere()) ...
is interchangeable with the code:
if (level == Level.SEVERE) ...
true
if this object represents the SEVERE level,
false
otherwise.public boolean isWarning()
This method is effectively equivalent to the conditional test:
(this == WARNING)
, ie. the code:
if (level.isWarning()) ...
is interchangeable with the code:
if (level == Level.WARNING) ...
true
if this object represents the WARNING level,
false
otherwise.public boolean isMinor()
This method is effectively equivalent to the conditional test:
(this == INFO)
, ie. the code:
if (level.isMinor()) ...
is interchangeable with the code:
if (level == Level.INFO) ...
true
if this object represents the INFO level,
false
otherwise.public boolean isConfig()
This method is effectively equivalent to the conditional test:
(this == CONFIG)
, ie. the code:
if (level.isConfig()) ...
is interchangeable with the code:
if (level == Level.CONFIG) ...
true
if this object represents the CONFIG level,
false
otherwise.public boolean isFine()
This method is effectively equivalent to the conditional test:
(this == FINE)
, ie. the code:
if (level.isFine()) ...
is interchangeable with the code:
if (level == Level.FINE) ...
true
if this object represents the FINE level,
false
otherwise.public boolean isFiner()
This method is effectively equivalent to the conditional test:
(this == FINER)
, ie. the code:
if (level.isFiner()) ...
is interchangeable with the code:
if (level == Level.FINER) ...
true
if this object represents the FINER level,
false
otherwise.public boolean isFinest()
This method is effectively equivalent to the conditional test:
(this == FINEST)
, ie. the code:
if (level.isFinest()) ...
is interchangeable with the code:
if (level == Level.FINEST) ...
true
if this object represents the FINEST level,
false
otherwise.public boolean isHigherLevel(Level other) throws NullPointerException
other
- the Level
object to compare this with.true
if the level represented by this Level
object is a higher level than the level represented by the specified
Level
object, false
otherwise.NullPointerException
- if other
is null
.public boolean equals(Object obj)
public int hashCode()