|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jorphan.util.Converter
public class Converter
Converter utilities for TestBeans
Constructor Summary | |
---|---|
Converter()
|
Method Summary | |
---|---|
static Object |
convert(Object value,
Class<?> toType)
Convert the given value object to an object of the given type |
static String |
formatCalendar(Calendar date,
String pattern)
|
static String |
formatDate(Calendar date,
String pattern)
|
static String |
formatDate(Date date,
String pattern)
|
static String |
formatDate(Date date,
String pattern)
|
static String |
formatDate(String date,
String pattern)
|
static boolean |
getBoolean(Object o)
|
static boolean |
getBoolean(Object o,
boolean defaultValue)
|
static Calendar |
getCalendar(Object o)
|
static Calendar |
getCalendar(Object date,
Calendar defaultValue)
Converts the given object to a calendar object. |
static char |
getChar(Object o)
|
static char |
getChar(Object o,
char defaultValue)
|
static Date |
getDate(Object date)
|
static Date |
getDate(Object date,
Date defaultValue)
|
static double |
getDouble(Object o)
|
static double |
getDouble(Object o,
double defaultValue)
|
static File |
getFile(Object o)
|
static float |
getFloat(Object o)
|
static float |
getFloat(Object o,
float defaultValue)
|
static int |
getInt(Object o)
Converts object to an integer, defaults to 0 if object is not convertible or is null. |
static int |
getInt(Object o,
int defaultValue)
Convert object to integer, return defaultValue if object is not convertible or is null. |
static long |
getLong(Object o)
Converts object to a long, defaults to 0 if object is not convertible or is null |
static long |
getLong(Object o,
long defaultValue)
Converts object to a long, return defaultValue if object is not convertible or is null. |
static String |
getString(Object o)
Converts object to a String, defaults to empty string if object is null. |
static String |
getString(Object o,
String defaultValue)
Converts object to a String, return defaultValue if object is null. |
static String |
insertLineBreaks(String v,
String insertion)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Converter()
Method Detail |
---|
public static Object convert(Object value, Class<?> toType)
value
- toType
-
public static Calendar getCalendar(Object date, Calendar defaultValue)
date
-
public static Calendar getCalendar(Object o)
public static Date getDate(Object date)
public static Date getDate(Object date, Date defaultValue)
public static float getFloat(Object o, float defaultValue)
public static float getFloat(Object o)
public static double getDouble(Object o, double defaultValue)
public static double getDouble(Object o)
public static boolean getBoolean(Object o)
public static boolean getBoolean(Object o, boolean defaultValue)
public static int getInt(Object o, int defaultValue)
o
- defaultValue
-
public static char getChar(Object o)
public static char getChar(Object o, char defaultValue)
public static int getInt(Object o)
o
-
public static long getLong(Object o, long defaultValue)
o
- defaultValue
-
public static long getLong(Object o)
o
-
public static String formatDate(Date date, String pattern)
public static String formatDate(Date date, String pattern)
public static String formatDate(String date, String pattern)
public static String formatDate(Calendar date, String pattern)
public static String formatCalendar(Calendar date, String pattern)
public static String getString(Object o, String defaultValue)
o
- defaultValue
-
public static String insertLineBreaks(String v, String insertion)
public static String getString(Object o)
o
-
public static File getFile(Object o)
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |