- java.lang.Object
-
- util.TextDecoratorUtil
-
public class TextDecoratorUtil extends java.lang.ObjectTheTextDecoratorUtilclass 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.StringBOLDBOLDconstant ANSI escape code for bold textstatic java.lang.StringITALICITALICconstant ANSI escape code for italic textstatic java.lang.StringRESETRESETconstant ANSI reset codestatic java.lang.StringUNDERLINEUNDERLINEconstant 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.StringboldText(java.lang.String text)Formats string to be boldstatic java.lang.StringitalicText(java.lang.String text)Formats string to be italicizedstatic java.lang.StringunderlineText(java.lang.String text)Formats string to be underlined
-
-
-
Field Detail
-
UNDERLINE
public static final java.lang.String UNDERLINE
UNDERLINEconstant ANSI escape code for underline text- See Also:
- Constant Field Values
-
BOLD
public static final java.lang.String BOLD
BOLDconstant ANSI escape code for bold text- See Also:
- Constant Field Values
-
ITALIC
public static final java.lang.String ITALIC
ITALICconstant ANSI escape code for italic text- See Also:
- Constant Field Values
-
RESET
public static final java.lang.String RESET
RESETconstant 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
-
-