- java.lang.Object
-
- utils.TextDecorationUtils
-
public class TextDecorationUtils extends java.lang.Object
TheTextDecorationUtils
class provides utility methods for providing text decoration in the console display for the whole application.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BOLD
BOLD
constant ANSI escape codes for bold text.static java.lang.String
ITALIC
ITALIC
constant ANSI escape codes for italic text.static java.lang.String
RESET_CODE
RESET_CODE
ANSI reset code.static java.lang.String
UNDERLINE
UNDERLINE
constant ANSI escape codes for underline text.
-
Constructor Summary
Constructors Constructor Description TextDecorationUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
boldText(java.lang.String text)
Formats a string to be bolded.static java.lang.String
italicText(java.lang.String text)
Formats a string to be italic.static java.lang.String
underlineText(java.lang.String text)
Formats a string to be underlined.
-
-
-
Field Detail
-
UNDERLINE
public static final java.lang.String UNDERLINE
UNDERLINE
constant ANSI escape codes for underline text.- See Also:
- Constant Field Values
-
BOLD
public static final java.lang.String BOLD
BOLD
constant ANSI escape codes for bold text.- See Also:
- Constant Field Values
-
ITALIC
public static final java.lang.String ITALIC
ITALIC
constant ANSI escape codes for italic text.- See Also:
- Constant Field Values
-
RESET_CODE
public static final java.lang.String RESET_CODE
RESET_CODE
ANSI reset code.- See Also:
- Constant Field Values
-
-
Method Detail
-
underlineText
public static java.lang.String underlineText(java.lang.String text)
Formats a string to be underlined.- Parameters:
text
- the string to be formatted- Returns:
- the underlined string
-
boldText
public static java.lang.String boldText(java.lang.String text)
Formats a string to be bolded.- Parameters:
text
- the string to be formatted- Returns:
- the bolded string
-
italicText
public static java.lang.String italicText(java.lang.String text)
Formats a string to be italic.- Parameters:
text
- the string to be formatted- Returns:
- the italic string
-
-