All Packages Class Hierarchy This Package Previous Next Index
Class JObserve.SConvert
java.lang.Object
|
+----JObserve.SConvert
- public class SConvert
- extends Object
Conversions from String to Numeric utility class
This class consists of static member functions and is never instantiated.
-
SConvert()
-
-
charToInt(char)
- char to int, default
0.0 returned if number is malformed
-
charToInt(char, int)
- char to int, default specified
default returned if number is malformed
-
StringToDouble(String)
- String to double, 0.0 default
0.0 returned if number is malformed, only first token is parsed.
-
StringToDouble(String, double)
- String to double, default specified
default returned if number is malformed, only first token is parsed.
-
StringToInt(String)
- String to int, default
0.0 returned if number is malformed, only first token is parsed.
-
StringToInt(String, int)
- String to int, default specified
default returned if number is malformed, only first token is parsed.
SConvert
public SConvert()
StringToDouble
public static double StringToDouble(String Value)
- String to double, 0.0 default
0.0 returned if number is malformed, only first token is parsed.
- Parameters:
- string - to be converted
- Returns:
- numeric value or 0.0 on decode error
StringToDouble
public static double StringToDouble(String Value,
double def)
- String to double, default specified
default returned if number is malformed, only first token is parsed.
- Parameters:
- string - to be converted
- value - to be used if string bad
- Returns:
- numeric value or default on decode error
StringToInt
public static int StringToInt(String Value)
- String to int, default
0.0 returned if number is malformed, only first token is parsed.
- Parameters:
- string - to be converted
- Returns:
- numeric value or 0.0 on decode error
StringToInt
public static int StringToInt(String Value,
int def)
- String to int, default specified
default returned if number is malformed, only first token is parsed.
- Parameters:
- string - to be converted
- value - to be used if string bad
- Returns:
- numeric value or default on decode error
charToInt
public static int charToInt(char Value)
- char to int, default
0.0 returned if number is malformed
- Parameters:
- char - to be converted
- Returns:
- numeric value or 0.0 on decode error
charToInt
public static int charToInt(char Value,
int def)
- char to int, default specified
default returned if number is malformed
- Parameters:
- char - to be converted
- value - to be used if char bad
- Returns:
- numeric value or default on decode error
All Packages Class Hierarchy This Package Previous Next Index