org.speakright.core
Class SRUtils

java.lang.Object
  extended by org.speakright.core.SRUtils

public class SRUtils
extends java.lang.Object

Holds commonly used stuff like safeToInt.

Author:
IanRaeLaptop

Constructor Summary
SRUtils()
           
 
Method Summary
static double safeToDouble(java.lang.String s)
          Convert string to int without exceptions being thrown.
static int safeToInt(java.lang.String s)
          Convert string to int without exceptions being thrown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SRUtils

public SRUtils()
Method Detail

safeToInt

public static int safeToInt(java.lang.String s)
Convert string to int without exceptions being thrown.

Parameters:
s - string to be converted, such as "15"
Returns:
integer value of s, 0 if conversion fails.

safeToDouble

public static double safeToDouble(java.lang.String s)
Convert string to int without exceptions being thrown.

Parameters:
s - string to be converted, such as "15"
Returns:
integer value of s, 0 if conversion fails.