ch.javasoft.util.logging
Enum LevelFilter.Type

java.lang.Object
  extended by java.lang.Enum<LevelFilter.Type>
      extended by ch.javasoft.util.logging.LevelFilter.Type
All Implemented Interfaces:
Serializable, Comparable<LevelFilter.Type>
Enclosing class:
LevelFilter

public static enum LevelFilter.Type
extends Enum<LevelFilter.Type>

The filter type, somewhat like a comparison operator for the threshold level and the log record's log level


Enum Constant Summary
AtLeastAsSevere
          Level of log record must be at least as severe as the threshold level.
AtMostAsSevere
          Level of log record must be at most as severe as the threshold level.
LessSevere
          Level of log record must be less severe than the threshold level.
MoreSevere
          Level of log record must be more severe than the threshold level.
 
Method Summary
abstract  boolean isLoggable(LogRecord record, Level threshold)
          Performs the filtering, constant-specific implementation (see constant comments for details).
static LevelFilter.Type valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LevelFilter.Type[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MoreSevere

public static final LevelFilter.Type MoreSevere
Level of log record must be more severe than the threshold level.

Record level rec.level passes the filter if rec.level.intValue() > threshold.intValue()


AtLeastAsSevere

public static final LevelFilter.Type AtLeastAsSevere
Level of log record must be at least as severe as the threshold level.

Record level rec.level passes the filter if rec.level.intValue() >= threshold.intValue()


AtMostAsSevere

public static final LevelFilter.Type AtMostAsSevere
Level of log record must be at most as severe as the threshold level.

Record level rec.level passes the filter if rec.level.intValue() <= threshold.intValue()


LessSevere

public static final LevelFilter.Type LessSevere
Level of log record must be less severe than the threshold level.

Record level rec.level passes the filter if rec.level.intValue() < threshold.intValue()

Method Detail

values

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

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

valueOf

public static LevelFilter.Type 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

isLoggable

public abstract boolean isLoggable(LogRecord record,
                                   Level threshold)
Performs the filtering, constant-specific implementation (see constant comments for details). Returns true if the record is loggable.