Package csw.logging.models
Class Level
java.lang.Object
csw.logging.models.Level
- All Implemented Interfaces:
LoggingSerializable
,enumeratum.EnumEntry
,Comparable<Level>
,scala.math.Ordered<Level>
- Direct Known Subclasses:
Level.DEBUG$
,Level.ERROR$
,Level.FATAL$
,Level.INFO$
,Level.TRACE$
,Level.WARN$
public abstract class Level
extends Object
implements enumeratum.EnumEntry, LoggingSerializable, scala.math.Ordered<Level>
A logging level.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The DEBUG logging level.static class
The ERROR logging level.static class
The FATAL logging level.static class
The INFO logging level.static class
The TRACE logging level.static class
The WARN logging level.Nested classes/interfaces inherited from interface enumeratum.EnumEntry
enumeratum.EnumEntry.Camelcase, enumeratum.EnumEntry.CapitalDotcase, enumeratum.EnumEntry.CapitalHyphencase, enumeratum.EnumEntry.CapitalSnakecase, enumeratum.EnumEntry.CapitalWords, enumeratum.EnumEntry.Dotcase, enumeratum.EnumEntry.EnumEntryOps<A extends enumeratum.EnumEntry>, enumeratum.EnumEntry.EnumEntryOps$, enumeratum.EnumEntry.Hyphencase, enumeratum.EnumEntry.LowerCamelcase, enumeratum.EnumEntry.Lowercase, enumeratum.EnumEntry.Snakecase, enumeratum.EnumEntry.Uncapitalised, enumeratum.EnumEntry.Uppercase, enumeratum.EnumEntry.UpperDotcase, enumeratum.EnumEntry.UpperHyphencase, enumeratum.EnumEntry.UpperSnakecase, enumeratum.EnumEntry.UpperWords, enumeratum.EnumEntry.Words
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Level
Level constructor.int
Compares levelsstatic String
static scala.collection.immutable.Map<String,
A> protected static scala.collection.immutable.IndexedSeq<A>
static boolean
Checks if a level name exists.static int
indexOf
(A member) name()
A level name.int
pos()
static String
static scala.collection.immutable.IndexedSeq<Level>
values()
static A
static scala.util.Either<enumeratum.NoSuchMember<A>,
A> withNameEither
(String name) static A
withNameInsensitive
(String name) static scala.util.Either<enumeratum.NoSuchMember<A>,
A> static scala.Option<A>
static A
withNameLowercaseOnly
(String name) static scala.util.Either<enumeratum.NoSuchMember<A>,
A> static scala.Option<A>
static scala.Option<A>
withNameOption
(String name) static A
withNameUppercaseOnly
(String name) static scala.util.Either<enumeratum.NoSuchMember<A>,
A> static scala.Option<A>
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface enumeratum.EnumEntry
enumeratum$EnumEntry$$stableEntryName
Methods inherited from interface scala.math.Ordered
$greater, $greater$eq, $less, $less$eq, compareTo
-
Constructor Details
-
Level
-
-
Method Details
-
namesToValuesMap
-
lowerCaseNamesToValuesMap
-
upperCaseNameValuesToMap
-
valuesToIndex
-
values
-
stringify
-
apply
Level constructor.- Parameters:
name
- a level name. Case is ignored.- Returns:
- the corresponding Level if there is one for that name. Otherwise WARN.
-
hasLevel
Checks if a level name exists.- Parameters:
name
- the level name.- Returns:
- true if a level with that name exists.
-
extraNamesToValuesMap
-
withName
-
withNameOption
-
withNameEither
-
withNameInsensitive
-
withNameUppercaseOnly
-
withNameLowercaseOnly
-
withNameInsensitiveOption
-
withNameUppercaseOnlyOption
-
withNameLowercaseOnlyOption
-
withNameInsensitiveEither
public static scala.util.Either<enumeratum.NoSuchMember<A>,A> withNameInsensitiveEither(String name) -
withNameUppercaseOnlyEither
public static scala.util.Either<enumeratum.NoSuchMember<A>,A> withNameUppercaseOnlyEither(String name) -
withNameLowercaseOnlyEither
public static scala.util.Either<enumeratum.NoSuchMember<A>,A> withNameLowercaseOnlyEither(String name) -
indexOf
public static int indexOf(A member) -
findValues
protected static scala.collection.immutable.IndexedSeq<A> findValues() -
enumeratum$Enum$$existingEntriesString
-
entryName
- Specified by:
entryName
in interfaceenumeratum.EnumEntry
-
pos
public int pos() -
name
A level name.- Returns:
- (undocumented)
-
compare
Compares levels- Specified by:
compare
in interfacescala.math.Ordered<Level>
- Parameters:
that
- the other level- Returns:
x
where: -x < 0
whenthis < that
-x == 0
whenthis == that
-x > 0
whenthis > that
-