|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.configuration.PropertyConverter
A utility class to convert the configuration properties into any type.
| Constructor Summary | |
PropertyConverter()
|
|
| Method Summary | |
static List |
split(String s,
char delimiter)
Split a string on the specified delimiter. |
static BigDecimal |
toBigDecimal(Object value)
Convert the specified object into a BigDecimal. |
static BigInteger |
toBigInteger(Object value)
Convert the specified object into a BigInteger. |
static Boolean |
toBoolean(Object value)
Convert the specified object into a Boolean. |
static Byte |
toByte(Object value)
Convert the specified object into a Byte. |
static Calendar |
toCalendar(Object value,
String format)
Convert the specified object into a Calendar. |
static Color |
toColor(Object value)
Convert the specified object into a Color. |
static Date |
toDate(Object value,
String format)
Convert the specified object into a Calendar. |
static Double |
toDouble(Object value)
Convert the specified object into a Double. |
static Float |
toFloat(Object value)
Convert the specified object into a Float. |
static Integer |
toInteger(Object value)
Convert the specified object into an Integer. |
static Iterator |
toIterator(Object value,
char delimiter)
Return an iterator over the simple values of a composite value. |
static Locale |
toLocale(Object value)
Convert the specified object into a Locale. |
static Long |
toLong(Object value)
Convert the specified object into a Long. |
static Short |
toShort(Object value)
Convert the specified object into a Short. |
static URL |
toURL(Object value)
Convert the specified object into an URL. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PropertyConverter()
| Method Detail |
public static Boolean toBoolean(Object value)
throws ConversionException
value - the value to convert
ConversionException - thrown if the value cannot be converted to a boolean
public static Byte toByte(Object value)
throws ConversionException
value - the value to convert
ConversionException - thrown if the value cannot be converted to a byte
public static Short toShort(Object value)
throws ConversionException
value - the value to convert
ConversionException - thrown if the value cannot be converted to a short
public static Integer toInteger(Object value)
throws ConversionException
value - the value to convert
ConversionException - thrown if the value cannot be converted to an integer
public static Long toLong(Object value)
throws ConversionException
value - the value to convert
ConversionException - thrown if the value cannot be converted to a Long
public static Float toFloat(Object value)
throws ConversionException
value - the value to convert
ConversionException - thrown if the value cannot be converted to a Float
public static Double toDouble(Object value)
throws ConversionException
value - the value to convert
ConversionException - thrown if the value cannot be converted to a Double
public static BigInteger toBigInteger(Object value)
throws ConversionException
value - the value to convert
ConversionException - thrown if the value cannot be converted to a BigInteger
public static BigDecimal toBigDecimal(Object value)
throws ConversionException
value - the value to convert
ConversionException - thrown if the value cannot be converted to a BigDecimal
public static URL toURL(Object value)
throws ConversionException
value - the value to convert
ConversionException - thrown if the value cannot be converted to an URL
public static Locale toLocale(Object value)
throws ConversionException
value - the value to convert
ConversionException - thrown if the value cannot be converted to a Locale
public static List split(String s,
char delimiter)
s - the string to splitdelimiter - the delimiter
public static Color toColor(Object value)
throws ConversionException
value - the value to convert
ConversionException - thrown if the value cannot be converted to a Color
public static Date toDate(Object value,
String format)
throws ConversionException
value - the value to convertformat - the DateFormat pattern to parse String values
ConversionException - thrown if the value cannot be converted to a Calendar
public static Calendar toCalendar(Object value,
String format)
throws ConversionException
value - the value to convertformat - the DateFormat pattern to parse String values
ConversionException - thrown if the value cannot be converted to a Calendar
public static Iterator toIterator(Object value,
char delimiter)
value - the value to "split"delimiter - the delimiter for String values
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||