|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.canoo.webtest.util.ConversionUtil
public class ConversionUtil
Date: May 4, 2005
| Constructor Summary | |
|---|---|
ConversionUtil()
|
|
| Method Summary | |
|---|---|
static boolean |
convertToBoolean(String value,
boolean defaultValue)
Convert a string value to a boolean according to ANT defintion of true. |
static double |
convertToDouble(String value,
double defaultValue)
Convert a string value to a double. |
static float |
convertToFloat(String value,
float defaultValue)
Convert a string value to a float. |
static int |
convertToInt(String value,
int defaultValue)
Convert a string value to an integer. |
static int |
convertToIntOrReject(String property,
String value,
Step step)
Parses a value as integer. |
static long |
convertToLong(String value,
long defaultValue)
Convert a string value to a long. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConversionUtil()
| Method Detail |
|---|
public static boolean convertToBoolean(String value,
boolean defaultValue)
public static int convertToInt(String value,
int defaultValue)
NumberFormatException
public static long convertToLong(String value,
long defaultValue)
NumberFormatException
public static float convertToFloat(String value,
float defaultValue)
NumberFormatException
public static double convertToDouble(String value,
double defaultValue)
NumberFormatException
public static int convertToIntOrReject(String property,
String value,
Step step)
throws StepExecutionException
property - the name of the property (used in the exception's message if parse fails)value - the value to parse
StepExecutionException - if the value can't be parsed as int
|
Copyright © 2001-2007 Canoo Engineering AG, Basel. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||