Package valorless.valorlessutils.text
Class TextFeatures
java.lang.Object
valorless.valorlessutils.text.TextFeatures
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateBar(double progress, double total, int barLength) Creates a progress bar with specified parameters.static StringcreateBar(double progress, double total, int barLength, String barColor, String fillColor, char barStyle, char fillStyle) Creates a progress bar with specified parameters and customizable styles and colors.static StringCreateBar(double progress, double total, int barLength) Deprecated, for removal: This API element is subject to removal in a future version.static StringCreateBar(double progress, double total, int barLength, String barColor, String fillColor, char barStyle, char fillStyle) Deprecated, for removal: This API element is subject to removal in a future version.static StringlimitCharacters(String text, int length) Limits the characters in a text to a specified length.static StringLimitCharacters(String text, int length) Deprecated, for removal: This API element is subject to removal in a future version.static StringlimitDecimal(String text, int length) Limits the decimal places in a number to a specified length.static StringLimitDecimal(String text, int length) Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
TextFeatures
public TextFeatures()
-
-
Method Details
-
createBar
Creates a progress bar with specified parameters.- Parameters:
progress- The current progress.total- The total progress value.barLength- The length of the progress bar.- Returns:
- The created progress bar as a string.
-
CreateBar
@Deprecated(since="Replaced by createBar()", forRemoval=true) public static String CreateBar(double progress, double total, int barLength) Deprecated, for removal: This API element is subject to removal in a future version. -
createBar
public static String createBar(double progress, double total, int barLength, String barColor, String fillColor, char barStyle, char fillStyle) Creates a progress bar with specified parameters and customizable styles and colors.- Parameters:
progress- The current progress.total- The total progress value.barLength- The length of the progress bar.barColor- The color of the progress bar. i.e. '§e'fillColor- The color of the filled part of the progress bar. i.e. '§e'barStyle- The style character for the progress bar. i.e. '#'fillStyle- The style character for the filled part of the progress bar. i.e. '='- Returns:
- The created progress bar as a string with customizable styles and colors.
-
CreateBar
@Deprecated(since="Replaced by createBar()", forRemoval=true) public static String CreateBar(double progress, double total, int barLength, String barColor, String fillColor, char barStyle, char fillStyle) Deprecated, for removal: This API element is subject to removal in a future version. -
limitCharacters
Limits the characters in a text to a specified length.- Parameters:
text- The text to limit.length- The maximum length of the text.- Returns:
- The limited text.
-
LimitCharacters
@Deprecated(since="Replaced by limitCharacters()", forRemoval=true) public static String LimitCharacters(String text, int length) Deprecated, for removal: This API element is subject to removal in a future version. -
limitDecimal
Limits the decimal places in a number to a specified length.- Parameters:
text- The number to limit.length- The maximum length of the decimal places.- Returns:
- The number with limited decimal places.
-
LimitDecimal
@Deprecated(since="Replaced by limitDecimal()", forRemoval=true) public static String LimitDecimal(String text, int length) Deprecated, for removal: This API element is subject to removal in a future version.
-