public final class Util extends Object
| Modifier and Type | Field and Description |
|---|---|
static Util |
INSTANCE |
static NumberFormat |
PERCENT_FORMATTER |
| Modifier and Type | Method and Description |
|---|---|
static String |
formatAsDecimal(int value,
int total) |
static String |
formatAsPercentage(int value,
int total)
Returns value converted to percentage format.
|
static String |
formatDuration(long duration) |
static String |
toValidFileName(String fileName)
Converts characters of passed string by replacing to dash (-) each character that might not be accepted as file
name such as / ?
|
public static final NumberFormat PERCENT_FORMATTER
public static final Util INSTANCE
public static String formatDuration(long duration)
public static String formatAsPercentage(int value, int total)
value - value to converttotal - sum of all valuespublic static String formatAsDecimal(int value, int total)
Copyright © 2018. All rights reserved.