- java.lang.Object
-
- util.TextDecoratorUtil
-
public class TextDecoratorUtil extends java.lang.Object
TheTextDecoratorUtil
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 code for bold textstatic java.lang.String
ITALIC
ITALIC
constant ANSI escape code for italic textstatic java.lang.String
RESET
RESET
constant ANSI reset codestatic java.lang.String
UNDERLINE
UNDERLINE
constant ANSI escape code for underline text
-
Constructor Summary
Constructors Constructor Description TextDecoratorUtil()
Construct an instance ofTextDecoratorUtil
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
boldText(java.lang.String text)
Formats string to be boldstatic java.lang.String
italicText(java.lang.String text)
Formats string to be italicizedstatic java.lang.String
underlineText(java.lang.String text)
Formats string to be underlined
-
-
-
Field Detail
-
UNDERLINE
public static final java.lang.String UNDERLINE
UNDERLINE
constant ANSI escape code for underline text- See Also:
- Constant Field Values
-
BOLD
public static final java.lang.String BOLD
BOLD
constant ANSI escape code for bold text- See Also:
- Constant Field Values
-
ITALIC
public static final java.lang.String ITALIC
ITALIC
constant ANSI escape code for italic text- See Also:
- Constant Field Values
-
RESET
public static final java.lang.String RESET
RESET
constant ANSI reset code- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TextDecoratorUtil
public TextDecoratorUtil()
Construct an instance ofTextDecoratorUtil
-
-
Method Detail
-
underlineText
public static java.lang.String underlineText(java.lang.String text)
Formats string to be underlined- Parameters:
text
- to be formatted- Returns:
- underlined text
-
boldText
public static java.lang.String boldText(java.lang.String text)
Formats string to be bold- Parameters:
text
- to be formatted- Returns:
- bold text
-
italicText
public static java.lang.String italicText(java.lang.String text)
Formats string to be italicized- Parameters:
text
- to be formatted- Returns:
- italic text
-
-