public class UtilFunction extends Object
| Modifier and Type | Method and Description | 
|---|---|
| static String | green(String msg) | 
| static Object | inferJsonType(String value)Infer the type of a string value and return it as one of Boolean, Long,
 Double or String. | 
| static void | printErrRed(String msg)Print to stderr a red message | 
| static void | printErrWhite(String msg)Print to stderr a white (normal) message | 
| static void | printOutGreen(String msg)Print to stdout a green message | 
| static void | printOutRed(String msg)Print to stdout a red message | 
| static void | printOutWhite(String msg)Print to stdout a white (normal) message | 
| static void | printOutYellow(String msg)Print to stdout a yellow message | 
| static String | red(String msg) | 
| static void | repeatDaemonThread(Supplier<Runnable> supplier,
                  String threadName)Start a new daemon thread but instead of quiting should the runnable exit, it is restarted 
 again and again. | 
| static Thread | startDaemonThread(Runnable r,
                 String threadName)Start a daemon thread | 
| static String | toCommaSeparatedUrls(List<String> values)Convert a list of string into a comma separated string | 
| static String | yellow(String msg) | 
public static Thread startDaemonThread(Runnable r, String threadName)
r - runnable classthreadName - name of your threadpublic static Object inferJsonType(String value)
value - the input string value.public static String toCommaSeparatedUrls(List<String> values)
values - a list of Strings [s1,s2,s3]public static String yellow(String msg)
msg - an input messagepublic static String green(String msg)
msg - an input messagepublic static String red(String msg)
msg - an input messagepublic static void printOutWhite(String msg)
msg - the messagepublic static void printErrWhite(String msg)
msg - the messagepublic static void printOutRed(String msg)
msg - the messagepublic static void printErrRed(String msg)
msg - the messagepublic static void printOutGreen(String msg)
msg - the messagepublic static void printOutYellow(String msg)
msg - the messagepublic static void repeatDaemonThread(Supplier<Runnable> supplier, String threadName)
supplier - the supplier to create a new Runnable at each restart.threadName - the thread nameCopyright © 2014–2022. All rights reserved.