net.sourceforge.acelogger.level.filter
Class RangedLevelFilter

java.lang.Object
  extended by net.sourceforge.acelogger.level.filter.BaseLevelFilter
      extended by net.sourceforge.acelogger.level.filter.RangedLevelFilter
All Implemented Interfaces:
Identifiable, LevelFilter

public class RangedLevelFilter
extends BaseLevelFilter

A filter that matches levels greater or equal the supplied one.

Since:
1.0.0
Version:
1.0.0
Author:
Zardi (https://sourceforge.net/users/daniel_zardi)

Constructor Summary
RangedLevelFilter(String identifier)
          Constructs a new filter that matches levels greater or equal the supplied one.
RangedLevelFilter(String identifier, LogLevel minimumLevel, LogLevel maximumLevel)
          Constructs a new filter that matches levels greater or equal the supplied one.
 
Method Summary
 LogLevel getMaximumLevel()
          Gets the maximum level of this filter.
 LogLevel getMinimumLevel()
          Gets the minimum level of this filter.
 boolean isSuitable(LogLevel level)
          Verifies if a log level is suitable for a determined logger.
 void setLevelRange(LogLevel minimumLevel, LogLevel maximumLevel)
          Sets the range of this filter.
 
Methods inherited from class net.sourceforge.acelogger.level.filter.BaseLevelFilter
getIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangedLevelFilter

public RangedLevelFilter(String identifier)
Constructs a new filter that matches levels greater or equal the supplied one. The level used is the one defined by LevelFilterConstants.DEFAULT_LEVEL.

Parameters:
identifier - The name of this filter.
Since:
1.0.0

RangedLevelFilter

public RangedLevelFilter(String identifier,
                         LogLevel minimumLevel,
                         LogLevel maximumLevel)
Constructs a new filter that matches levels greater or equal the supplied one.

Parameters:
identifier - The name of this filter.
minimumLevel - The minimum level for this filter.
maximumLevel - The maximum level for this filter.
Since:
1.0.0
Method Detail

getMinimumLevel

public final LogLevel getMinimumLevel()
Gets the minimum level of this filter.

Returns:
The minimum level.
Since:
1.0.0

getMaximumLevel

public final LogLevel getMaximumLevel()
Gets the maximum level of this filter.

Returns:
The maximum level.
Since:
1.0.0

setLevelRange

public final void setLevelRange(LogLevel minimumLevel,
                                LogLevel maximumLevel)
Sets the range of this filter.

Parameters:
minimumLevel - The minimum level to set.
maximumLevel - The maximum level to set.
Since:
1.0.0

isSuitable

public boolean isSuitable(LogLevel level)
Verifies if a log level is suitable for a determined logger.

Parameters:
level - The log level to test.
Returns:
True if the logger accepts this level; False otherwise.


Copyright © 2007-2010 The AceLogger Team. All Rights Reserved.