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 List<Hook> |
eliminateEmptyHooks(Hook[] hooks)
Helper method that removes empty hooks from passed array and packs it into new collection.
|
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 and replaces to hash which can be treated as valid file name.
|
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)
public static String toValidFileName(String fileName)
fileName - sequence that should be convertedCopyright © 2020. All rights reserved.