Module id.xfunction
Package id.xfunction

Class XUtils

Object
XUtils

public class XUtils extends Object
Set of miscellaneous functions.
  • Constructor Details

    • XUtils

      public XUtils()
  • Method Details

    • printMemoryConsumption

      public static void printMemoryConsumption(long delayMillis)
      Launches background thread which prints JVM memory consumption after given period of time.
    • quote

      public static String quote(String s)
      Trims the string and:
      • If string starts or ends with quote - nothing is done
      • Surrounds it with quotes and returns
    • unquote

      public static String unquote(String s)
      Trims the string and removes quotes from the head and tail. If string has one quote or no quotes nothing is done.
    • isWindows

      public static boolean isWindows()
    • runSafe

      public static void runSafe(ThrowingRunnable<Exception> runnable)