Class Formatter
- java.lang.Object
-
- com.realtime.crossfire.jxclient.util.Formatter
-
public class Formatter extends java.lang.ObjectUtility class for formatting values into strings.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull java.lang.StringformatFloat(double value, int digits)Formats a float value for display.static @NotNull java.lang.StringformatLong(long value)Returns alongvalue formatted as a human readable string.
-
-
-
Method Detail
-
formatLong
@NotNull public static @NotNull java.lang.String formatLong(long value)
Returns alongvalue formatted as a human readable string.- Parameters:
value- the value- Returns:
- return the formatted value
-
formatFloat
@NotNull public static @NotNull java.lang.String formatFloat(double value, int digits)Formats a float value for display.- Parameters:
value- the float valuedigits- the number of fraction digits; must be between 1..3 inclusive- Returns:
- the formatted value
-
-