Class GeneralUtils

java.lang.Object
com.biglybt.core.util.GeneralUtils

public class GeneralUtils extends Object
  • Field Details

    • REGEX_URLHTML

      private static final String REGEX_URLHTML
      See Also:
    • SMOOTHING_UPDATE_WINDOW_DEFAULT

      public static final int SMOOTHING_UPDATE_WINDOW_DEFAULT
      See Also:
    • SMOOTHING_UPDATE_WINDOW_MIN

      public static final int SMOOTHING_UPDATE_WINDOW_MIN
      See Also:
    • SMOOTHING_UPDATE_WINDOW_MAX

      public static final int SMOOTHING_UPDATE_WINDOW_MAX
      See Also:
    • SMOOTHING_UPDATE_WINDOW

      private static int SMOOTHING_UPDATE_WINDOW
    • SMOOTHING_UPDATE_INTERVAL

      private static int SMOOTHING_UPDATE_INTERVAL
    • unit_map

      private static Map<String,Integer> unit_map
    • unit_values

      static long[] unit_values
    • confusable_map_1

      private static Map<Integer,Integer> confusable_map_1
    • confusable_map_2

      private static Map<Integer,Integer> confusable_map_2
    • confusable_recent_1

      private static Map<String,String> confusable_recent_1
    • confusable_recent_2

      private static Map<String,String> confusable_recent_2
  • Constructor Details

    • GeneralUtils

      public GeneralUtils()
  • Method Details

    • replaceAll

      public static String replaceAll(String str, String[] from_strs, String[] to_strs)
      as above but does safe replacement of multiple strings (i.e. a match in the replacement of one string won't be substituted by another)
      Parameters:
      str -
      from_strs -
      to_strs -
      Returns:
    • stripOutHyperlinks

      public static String stripOutHyperlinks(String message)
    • splitQuotedTokens

      public static String[] splitQuotedTokens(String str)
      splits space separated tokens respecting quotes (either " or ' )
      Parameters:
      str -
      Returns:
    • createProcessBuilder

      public static ProcessBuilder createProcessBuilder(File workingDir, String[] cmd, String[] extra_env) throws IOException
      Throws:
      IOException
    • escapeDosCmd

      private static String escapeDosCmd(String string)
    • getSmoothUpdateWindow

      public static int getSmoothUpdateWindow()
    • getSmoothUpdateInterval

      public static int getSmoothUpdateInterval()
    • getSmoothAverageForReplay

      public static GeneralUtils.SmoothAverage getSmoothAverageForReplay()
    • getSmoothAverage

      public static GeneralUtils.SmoothAverage getSmoothAverage()
    • stringJoin

      public static String stringJoin(Collection<?> list, String delim)
    • isDoubleQuote

      public static boolean isDoubleQuote(char c)
    • isSingleQuote

      public static boolean isSingleQuote(char c)
    • startsWithDoubleQuote

      public static boolean startsWithDoubleQuote(String str)
    • endsWithDoubleQuote

      public static boolean endsWithDoubleQuote(String str)
    • startsWithIgnoreCase

      public static boolean startsWithIgnoreCase(String s1, String s2)
    • getUnitMultiplier

      public static long getUnitMultiplier(String unit, boolean treat_decimal_as_binary)
    • playSound

      public static void playSound(String sound_file)
    • getConfusableEquivalent

      public static String getConfusableEquivalent(String str, boolean is_query)
    • decomposeArgs

      public static String[] decomposeArgs(String str)