Package com.biglybt.core.util
Class GeneralUtils
java.lang.Object
com.biglybt.core.util.GeneralUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
private static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static int
private static int
static final int
static final int
static final int
(package private) static long[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProcessBuilder
createProcessBuilder
(File workingDir, String[] cmd, String[] extra_env) static String[]
decomposeArgs
(String str) static boolean
private static String
escapeDosCmd
(String string) static String
getConfusableEquivalent
(String str, boolean is_query) static GeneralUtils.SmoothAverage
static GeneralUtils.SmoothAverage
static int
static int
static long
getUnitMultiplier
(String unit, boolean treat_decimal_as_binary) static boolean
isDoubleQuote
(char c) static boolean
isSingleQuote
(char c) static void
static String
replaceAll
(String str, String[] from_strs, String[] to_strs) as above but does safe replacement of multiple strings (i.e.static String[]
splitQuotedTokens
(String str) splits space separated tokens respecting quotes (either " or ' )static boolean
static boolean
startsWithIgnoreCase
(String s1, String s2) static String
stringJoin
(Collection<?> list, String delim) static String
stripOutHyperlinks
(String message)
-
Field Details
-
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
-
unit_values
static long[] unit_values -
confusable_map_1
-
confusable_map_2
-
confusable_recent_1
-
confusable_recent_2
-
-
Constructor Details
-
GeneralUtils
public GeneralUtils()
-
-
Method Details
-
replaceAll
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
-
splitQuotedTokens
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
-
getSmoothUpdateWindow
public static int getSmoothUpdateWindow() -
getSmoothUpdateInterval
public static int getSmoothUpdateInterval() -
getSmoothAverageForReplay
-
getSmoothAverage
-
stringJoin
-
isDoubleQuote
public static boolean isDoubleQuote(char c) -
isSingleQuote
public static boolean isSingleQuote(char c) -
startsWithDoubleQuote
-
endsWithDoubleQuote
-
startsWithIgnoreCase
-
getUnitMultiplier
-
playSound
-
getConfusableEquivalent
-
decomposeArgs
-