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.


Constructor Index

 o SConvert()

Method Index

 o charToInt(char)
char to int, default 0.0 returned if number is malformed
 o charToInt(char, int)
char to int, default specified default returned if number is malformed
 o StringToDouble(String)
String to double, 0.0 default 0.0 returned if number is malformed, only first token is parsed.
 o StringToDouble(String, double)
String to double, default specified default returned if number is malformed, only first token is parsed.
 o StringToInt(String)
String to int, default 0.0 returned if number is malformed, only first token is parsed.
 o StringToInt(String, int)
String to int, default specified default returned if number is malformed, only first token is parsed.

Constructors

 o SConvert
 public SConvert()

Methods

 o 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
 o 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
 o 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
 o 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
 o 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
 o 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