Class Util
java.lang.Object
org.sblim.cimclient.internal.util.Util
public class Util
extends java.lang.Object
Class Util is responsible for storing commonly used static methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic java.lang.String[]
getFilteredStringArray
(java.lang.String[] pArray, java.lang.String pIgnoreElements) Filters any elements listed inpIgnoreElements
out ofpArray
and returns the updated array.static boolean
isBadDoubleString
(java.lang.String s) isBadDoubleString checks if passed string could hang JVM.static java.lang.String
quote
(java.lang.String pStr) Quotes the passed string.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
quote
public static java.lang.String quote(java.lang.String pStr) Quotes the passed string.- Parameters:
pStr
-- Returns:
- the quoted string
-
isBadDoubleString
public static boolean isBadDoubleString(java.lang.String s) isBadDoubleString checks if passed string could hang JVM.- Parameters:
s
- A string to be converted to a Double.- Returns:
true
if double is in range of bad values,false
otherwise.
-
getFilteredStringArray
public static java.lang.String[] getFilteredStringArray(java.lang.String[] pArray, java.lang.String pIgnoreElements) Filters any elements listed inpIgnoreElements
out ofpArray
and returns the updated array. For example, ifpArray = {"A", "B", "C", "D", "E", "F", "G"}
andpIgnoreElements = "D,E,B"
then this method returns{"A", "C", "F", "G"}
.- Parameters:
pArray
- Original string array.pIgnoreElements
- Comma-separated list of array elements to ignore.- Returns:
- Updated string array.
-