Class Level

    • Method Detail

      • toInt

        public int toInt()
        Returns the integer representation of this Level.
      • toInteger

        public Integer toInteger()
        Convert a Level to an Integer object.
        Returns:
        This level's Integer mapping.
      • isGreaterOrEqual

        public boolean isGreaterOrEqual​(Level r)
        Returns true if this Level has a higher or equal Level than the Level passed as argument, false otherwise.
      • toLevel

        public static Level toLevel​(String sArg)
        Convert the string passed as argument to a Level. If the conversion fails, then this method returns DEBUG.
      • valueOf

        public static Level valueOf​(String sArg)
        This method exists in order to comply with Joran's valueOf convention.
        Parameters:
        sArg -
        Returns:
      • toLevel

        public static Level toLevel​(int val)
        Convert an integer passed as argument to a Level. If the conversion fails, then this method returns DEBUG.
      • toLevel

        public static Level toLevel​(int val,
                                    Level defaultLevel)
        Convert an integer passed as argument to a Level. If the conversion fails, then this method returns the specified default.
      • toLevel

        public static Level toLevel​(String sArg,
                                    Level defaultLevel)
        Convert the string passed as argument to a Level. If the conversion fails, then this method returns the value of defaultLevel.
      • fromLocationAwareLoggerInteger

        public static Level fromLocationAwareLoggerInteger​(int levelInt)
        Convert one of the integer values defined in LocationAwareLogger interface to an instance of this class, i.e. a Level.
        Parameters:
        levelInt - An integer value representing a level as defined in LocationAwareLogger
        Returns:
        an instance of this class, i.e. a Level.
        Since:
        1.0.1
      • toLocationAwareLoggerInteger

        public static int toLocationAwareLoggerInteger​(Level level)
        Convert this level instance to an integer value defined in the LocationAwareLogger interface.
        Parameters:
        level - The level to convert to LocationAwareLogger integer
        Returns:
        int An integer corresponding to this level as defined in LocationAwareLogger
        Since:
        1.0.1