Enum FormatType

    • Enum Constant Detail

      • GENERAL

        public static final FormatType GENERAL
        General formatting that can be applied to any type.
      • BOOLEAN

        public static final FormatType BOOLEAN
        Formatting that can be applied to any boolean type.
      • CHARACTER

        public static final FormatType CHARACTER
        Formatting that can be applied to Character or any integral type that can be losslessly converted to an int and for which Character.isValidCodePoint(int) returns true.
      • INTEGRAL

        public static final FormatType INTEGRAL
        Formatting that can be applied to any integral Number type. Logging backends must support Byte, Short, Integer, Long and BigInteger but may also support additional numeric types directly. A logging backend that encounters an unknown numeric type should fall back to using toString().
      • FLOAT

        public static final FormatType FLOAT
        Formatting that can be applied to any Number type. Logging backends must support all the integral types as well as Float, Double and BigDecimal, but may also support additional numeric types directly. A logging backend that encounters an unknown numeric type should fall back to using toString().
    • Method Detail

      • values

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

        public static FormatType 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
      • isNumeric

        public boolean isNumeric()
        True if this format type requires a Number instance (or one of the corresponding fundamental types) as an argument.
      • canFormat

        public abstract boolean canFormat​(Object arg)