|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.convert.ConvertUtils
public class ConvertUtils
Simple public API for the conversion system consisting of static methods.
The methods on this class access the default range of converters. If you wish
to add to the default set of converters you cannot use this class. Instead,
you must create an instance of Converter
and add the converters
there.
Constructor Summary | |
---|---|
protected |
ConvertUtils()
Restricted constructor. |
Method Summary | |
---|---|
static Object |
convert(Object value,
Class toClass)
Convert the specified input object into an output object of the another type. |
static Object |
convert(Object value,
Class fromClass,
Class toClass)
Convert the specified input object into an output object of the another type. |
static String |
convertToString(Object value)
Convert the specified input object into a String . |
static String |
convertToString(Object value,
Class fromClass)
Convert the specified input object into a String . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ConvertUtils()
Method Detail |
---|
public static Object convert(Object value, Class fromClass, Class toClass)
value
- the input value to be convertedfromClass
- the class to convert from, useful if null passed intoClass
- the class to convert to
ConversionException
- (runtime) if conversion failspublic static Object convert(Object value, Class toClass)
value
- the input value to be convertedtoClass
- the class to convert to
ConversionException
- (runtime) if conversion failspublic static String convertToString(Object value, Class fromClass)
String
.
value
- the input value to be convertedfromClass
- the class to convert from, useful if null passed in
ConversionException
- (runtime) if conversion failspublic static String convertToString(Object value)
String
.
value
- the input value to be converted
ConversionException
- (runtime) if conversion fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |