java.lang.Object
java.lang.Enum<Format>
com.clumd.projects.java_common_utils.logging.common.Format
All Implemented Interfaces:
LogLevelFormat, Serializable, Comparable<Format>, Constable

public enum Format extends Enum<Format> implements LogLevelFormat
Simple Formatting Utility class to describe basic transformations you could do to a Console Log String.
  • Enum Constant Details

    • RESET

      public static final Format RESET
    • BOLD

      public static final Format BOLD
    • UNDERLINE

      public static final Format UNDERLINE
    • ITALIC

      public static final Format ITALIC
    • OUTLINE

      public static final Format OUTLINE
    • BLACK

      public static final Format BLACK
    • RED

      public static final Format RED
    • GREEN

      public static final Format GREEN
    • YELLOW

      public static final Format YELLOW
    • BLUE

      public static final Format BLUE
    • PURPLE

      public static final Format PURPLE
    • CYAN

      public static final Format CYAN
    • WHITE

      public static final Format WHITE
    • BRIGHT_BLACK

      public static final Format BRIGHT_BLACK
    • BRIGHT_RED

      public static final Format BRIGHT_RED
    • BRIGHT_GREEN

      public static final Format BRIGHT_GREEN
    • BRIGHT_YELLOW

      public static final Format BRIGHT_YELLOW
    • BRIGHT_BLUE

      public static final Format BRIGHT_BLUE
    • BRIGHT_PURPLE

      public static final Format BRIGHT_PURPLE
    • BRIGHT_CYAN

      public static final Format BRIGHT_CYAN
    • BRIGHT_WHITE

      public static final Format BRIGHT_WHITE
    • BLACK_BACKGROUND

      public static final Format BLACK_BACKGROUND
    • RED_BACKGROUND

      public static final Format RED_BACKGROUND
    • GREEN_BACKGROUND

      public static final Format GREEN_BACKGROUND
    • YELLOW_BACKGROUND

      public static final Format YELLOW_BACKGROUND
    • BLUE_BACKGROUND

      public static final Format BLUE_BACKGROUND
    • PURPLE_BACKGROUND

      public static final Format PURPLE_BACKGROUND
    • CYAN_BACKGROUND

      public static final Format CYAN_BACKGROUND
    • WHITE_BACKGROUND

      public static final Format WHITE_BACKGROUND
    • BRIGHT_BLACK_BACKGROUND

      public static final Format BRIGHT_BLACK_BACKGROUND
    • BRIGHT_RED_BACKGROUND

      public static final Format BRIGHT_RED_BACKGROUND
    • BRIGHT_GREEN_BACKGROUND

      public static final Format BRIGHT_GREEN_BACKGROUND
    • BRIGHT_YELLOW_BACKGROUND

      public static final Format BRIGHT_YELLOW_BACKGROUND
    • BRIGHT_BLUE_BACKGROUND

      public static final Format BRIGHT_BLUE_BACKGROUND
    • BRIGHT_PURPLE_BACKGROUND

      public static final Format BRIGHT_PURPLE_BACKGROUND
    • BRIGHT_CYAN_BACKGROUND

      public static final Format BRIGHT_CYAN_BACKGROUND
    • BRIGHT_WHITE_BACKGROUND

      public static final Format BRIGHT_WHITE_BACKGROUND
  • Method Details

    • values

      public static Format[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Format valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • createFormat

      public static String createFormat(Collection<Format> formatModifiers)
      Used to create a custom Log Format with a selection of format modifiers, this can include Bold, underline and colour for example.
      Parameters:
      formatModifiers - The modifiers you would like this instance of Format to contain.
      Returns:
      The String representation for the asked for Format Modifiers.
    • getFormatString

      public String getFormatString()
      Description copied from interface: LogLevelFormat
      Gets the formatting string for the associated Log level
      Specified by:
      getFormatString in interface LogLevelFormat
      Returns:
      The Escape codes for the associated Log Level.