public class LogLevelUtil extends Object
LogLevel.mask()
values.
The 0
value correspond to all levels and is a violating the rule
(but how to make a search with no level ?)
to test if a set of LogLevel contains a given LogLevel use
contains(int, int)
to add a level in a set of LogLevel use addToSet(int, int)
to remove a level in a set of LogLevel use removeFromSet(int, int)
to obtain all levels contained in a set of LogLevel use
getLogLevels(int)
LogLevel
Constructor and Description |
---|
LogLevelUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
addToSet(int ordinal,
int setOflevels)
add a LogLevel to a set
|
static boolean |
contains(int ordinal,
int levels)
Using a performant algorithm to know if a LogLevel is contained in a
list of levels using his severity.
|
static int |
createSet(int firstOrdinal,
int... ordinals)
Compute the sum of levels toInit() value for
all given levels (given with their ordinal value).
|
static int |
createSet(LogLevel firstLevel,
LogLevel... levels) |
static LogLevel[] |
getLogLevels(int levels) |
static int |
removeFromSet(int ordinal,
int setOfLevels)
remove a LogLevel from a set
|
public static boolean contains(int ordinal, int levels)
ordinal
- the ordinal of the levellevels
- the sums of levelstrue
if this level is in levels given.public static LogLevel[] getLogLevels(int levels)
public static int createSet(int firstOrdinal, int... ordinals)
This value will be used for a performant filter process.
firstOrdinal
- the first level of levels to useordinals
- the level of levels to usepublic static int addToSet(int ordinal, int setOflevels)
ordinal
- the ordinal of the level to addsetOflevels
- the sum of mask() of some LogLevellevels
levels)public static int removeFromSet(int ordinal, int setOfLevels)
ordinal
- the ordinal of the level to removesetOfLevels
- the sum of mask() of some LogLevellevels
levels)Copyright © 1999–2020 CodeLutin. All rights reserved.