Enum DebugLevel

    • Enum Constant Detail

      • OFF

        public static final DebugLevel OFF
        flags the disabled debug state.
      • ERROR

        public static final DebugLevel ERROR
        flags the state where error debugging is enabled. When debugging is set to less than ERROR, error debugging is also disabled.
      • WARNING

        public static final DebugLevel WARNING
        flags the state where warning debugging is enabled, but message debugging is disabled. When debugging is set to less than WARNING, warning debugging is also disabled.
      • MESSAGE

        public static final DebugLevel MESSAGE
        This state enables debugging of messages, warnings and errors.
      • ON

        public static final DebugLevel ON
        flags the enabled debug state for warnings, errors and messages. Printing to a file is disabled. All printing is done on System.out.
    • Method Detail

      • values

        public static DebugLevel[] 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 (DebugLevel c : DebugLevel.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DebugLevel 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
      • fromName

        public static DebugLevel fromName​(String strName)
        Get Debug level from its name
        Parameters:
        strName - name in string
        Returns:
        debug level associated to this name
        Throws:
        IllegalArgumentException - if no debug names are associated to this name, an illegal argument exception is throw
      • getLevel

        public int getLevel()
        Get level that can be used for level comparison
        Returns:
        level number
      • getName

        public String getName()
        Get Name associated with this debug level
        Returns:
        name
      • compareLevel

        public int compareLevel​(DebugLevel o)
        Compares the debug level with the specified debug for order. Returns a negative integer, zero, or a positive integer as this level is less than, equal to, or greater than the specified object.
        Parameters:
        o - the object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.