public class Util extends Object
Modifier and Type | Field and Description |
---|---|
static DateFormat |
df
The "yyyy-MM-dd HH:mm:ss" date format.
|
static Pattern |
DIACRITICS_AND_FRIENDS |
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static String |
addTrailingZeros(double d,
int nbDec) |
static int |
getOccurencesNumber(String st,
String thing)
Count the number of occurences of a character in a string
|
static boolean |
isInteger(String str)
Check if a piece of text is an integer.
|
static boolean |
isNumeric(String s)
Check if a text represent a numerical value.
|
static void |
printProgress(int nbDone,
int nbTot)
Print progress in %
|
static HashMap<String,String> |
reverseMap(Map<String,String> map) |
static double |
round(double x,
int decimalNB)
Round a number
|
static String |
stripDiacritics(String str) |
static String |
stripWeirdCaracters(String str) |
static double[] |
toDoubleArray(Double[] in)
Double[] to double[]...
|
public static final DateFormat df
public static final Pattern DIACRITICS_AND_FRIENDS
public static double[] toDoubleArray(Double[] in)
in
- public static void printProgress(int nbDone, int nbTot)
nbDone
- nbTot
- public static double round(double x, int decimalNB)
x
- decimalNB
- public static boolean isInteger(String str)
str
- public static boolean isNumeric(String s)
s
- public static int getOccurencesNumber(String st, String thing)
st
- thing
- public static HashMap<String,String> reverseMap(Map<String,String> map)
map
- public static String addTrailingZeros(double d, int nbDec)
d
- nbDec
- Copyright © 2020. All rights reserved.