com.ibm.websphere.samples.plantsbywebsphereclient
Class PBWSUtility

java.lang.Object
  extended by com.ibm.websphere.samples.plantsbywebsphereclient.PBWSUtility

public class PBWSUtility
extends java.lang.Object

Various utility functions for the Sample.


Constructor Summary
PBWSUtility()
           
 
Method Summary
static void createDefaultConfig()
          Set the user defaults.
static java.lang.String getMoneyFormat(java.lang.String s)
          Format a given String with a currency-format without the currency symbols.
static float getMoneyValue(java.lang.String s)
          Returns the floating point value for a given String with a currency-format without the currency symbols.
static java.lang.String[] readTokens(java.lang.String text, java.lang.String token)
          Convert a delimited string into an array of Strings.
static boolean verifyEmail(java.lang.String s)
          Validate that an email address is of the proper format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PBWSUtility

public PBWSUtility()
Method Detail

readTokens

public static java.lang.String[] readTokens(java.lang.String text,
                                            java.lang.String token)
Convert a delimited string into an array of Strings.


getMoneyFormat

public static java.lang.String getMoneyFormat(java.lang.String s)
Format a given String with a currency-format without the currency symbols. If the string is an invalid number, then return 0.00.


getMoneyValue

public static float getMoneyValue(java.lang.String s)
Returns the floating point value for a given String with a currency-format without the currency symbols. If the string is an invalid number, then return 0.00.


verifyEmail

public static boolean verifyEmail(java.lang.String s)
Validate that an email address is of the proper format.

Parameters:
String - The email address to validate.
Returns:
boolean True if the input string has a valid email address format.

createDefaultConfig

public static void createDefaultConfig()
Set the user defaults.