|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.riverframework.utils.Converter
public class Converter
Provides converters from any type to String, Integer, Double and Date. If the converter can not make the conversion it returns "", 0, 0, and null, respectively. This class is useful in org.riverframework.wrapper.* because makes simple to recover data in Java format.
| Constructor Summary | |
|---|---|
Converter()
|
|
| Method Summary | |
|---|---|
static Date |
getAsDate(Object value)
Converts the value parameter to a Date. |
static Double |
getAsDouble(Object value)
Converts the value parameter to a Double. |
static Integer |
getAsInteger(Object value)
Converts the value parameter to an Integer. |
static Long |
getAsLong(Object value)
Converts the value parameter to a Long. |
static String |
getAsString(Object value)
Converts the value parameter to a String. |
| 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 String getAsString(Object value)
value - It could be any object.
public static Integer getAsInteger(Object value)
value - Accepts String or any Number
public static Long getAsLong(Object value)
value - Accepts String or any Number
public static Double getAsDouble(Object value)
value - Accepts String or any Number
public static Date getAsDate(Object value)
If the value is a Long number, it has to have the time in milliseconds.
value - Accepts String, Long and Date
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||