|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sssw.fw.util.EboConvert
This class provides static conversion routines between various Java types.
Constructor Summary | |
EboConvert()
|
Method Summary | |
static boolean |
equals(Object obj1,
Object obj2)
Compare two values by converting one to the type of the other. |
static boolean |
equals(Object obj1,
Object obj2,
Locale locale)
Compare two values by converting one to the type of the other. |
static boolean |
equals(Object obj1,
Object obj2,
Locale locale,
String zoneStr)
Compare two values by converting one to the type of the other. |
static BigDecimal |
toBigDecimal(Object obj)
Convert the object to a BigDecimal using the default locale |
static BigDecimal |
toBigDecimal(Object obj,
Locale locale)
Convert the object to a BigDecimal using the specified locale |
static Boolean |
toBoolean(Object obj)
Convert the object to a Boolean using the default locale |
static Boolean |
toBoolean(Object obj,
Locale locale)
Convert the object to a Boolean using the specified locale. |
static Byte |
toByte(Object obj)
Convert the object to a Byte using the default locale. |
static Byte |
toByte(Object obj,
Locale locale)
Convert the object to a Byte using the specified locale. |
static byte[] |
toByteArray(Object obj)
Convert the object to a byte array using the default locale. |
static byte[] |
toByteArray(Object obj,
Locale locale)
Convert the object to a byte array using the specified locale. |
static Object |
toClassInstance(Object obj,
Class c)
returns Object of desired class, or null if conversion is not possible |
static Object |
toClassInstance(Object obj,
Class c,
Locale locale)
returns Object of desired class, or null if conversion is not possible |
static Object |
toClassInstance(Object obj,
Class c,
Locale locale,
String zoneStr)
returns Object of desired class, or null if conversion is not possible |
static Double |
toDouble(Object obj)
Convert the object to a Double using the default locale |
static Double |
toDouble(Object obj,
Locale locale)
Convert the object to a Double using the specified locale |
static Float |
toFloat(Object obj)
Convert the object to a Float using the default locale |
static Float |
toFloat(Object obj,
Locale locale)
Convert the object to a Double using the specified locale |
static int |
toInt(Object obj)
Converts the object to a primitive integer. |
static Integer |
toInteger(Object obj)
Convert the object to a Integer using the default locale |
static Integer |
toInteger(Object obj,
Locale locale)
Convert the object to a Integer using the specified locale |
static Integer[] |
toIntegerArray(int[] arr)
Convert an array of primitive int's into an array of Integer objects. |
static Long |
toLong(Object obj)
Convert the object to a Integer using the default locale |
static Long |
toLong(Object obj,
Locale locale)
Convert the object to a Integer using the specified locale |
static boolean |
toPrimitiveBoolean(Object obj)
Converts the object to a primitive boolean. |
static double |
toPrimitiveDouble(Object obj)
Converts the object to a primitive double. |
static int |
toPrimitiveInteger(Object obj)
Converts the object to a primitive integer. |
static long |
toPrimitiveLong(Object obj)
Converts the object to a primitive long. |
static Short |
toShort(Object obj)
Convert the object to a Short using the default locale. |
static Short |
toShort(Object obj,
Locale locale)
Convert the object to a Short using the specified locale. |
static Date |
toSqlDate(Object obj)
Convert the object to a java.sql.Date using the default locale. |
static Date |
toSqlDate(Object obj,
Locale locale)
Convert the object to a java.sql.Date using the specified locale. |
static Date |
toSqlDate(Object obj,
Locale locale,
String zoneStr)
Convert the object to a java.sql.Date using the specified locale and timezone. |
static String |
toString(Object obj)
Convert the object to a String using the default locale |
static String |
toString(Object obj,
Locale locale)
Convert the object to a String using the specified locale |
static String |
toString(Object obj,
Locale locale,
String zoneStr)
Convert the object to a String using the specified locale and timezone |
static String[] |
toStringArray(Vector v)
Convert a Vector of Objects to a String Array by calling o.toString() on each |
static Time |
toTime(Object obj)
Convert the object to a java.sql.Time using the default locale. |
static Time |
toTime(Object obj,
Locale locale)
Convert the object to a java.sql.Time using the specified locale. |
static Time |
toTime(Object obj,
Locale locale,
String zoneStr)
Convert the object to a java.sql.Time using the specified locale and timezone. |
static Timestamp |
toTimestamp(Object obj)
Convert the object to a java.sql.Timestamp using the default locale. |
static Timestamp |
toTimestamp(Object obj,
Locale locale)
Convert the object to a java.sql.Timestamp using the specified locale. |
static Timestamp |
toTimestamp(Object obj,
Locale locale,
String zoneStr)
Convert the object to a java.sql.Timestamp using the specified locale and timezone. |
static Object |
toType(Object obj,
char datatypecode)
Converts an object to specified datatype |
static Object |
toType(Object obj,
char datatypecode,
Locale locale)
Converts an object to specified datatype for locale specified |
static Object |
toType(Object obj,
char datatypecode,
Locale locale,
String zoneStr)
Converts an object to specified datatype for locale specified |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public EboConvert()
Method Detail |
public static String toString(Object obj)
public static String toString(Object obj, Locale locale)
public static String toString(Object obj, Locale locale, String zoneStr)
public static Integer toInteger(Object obj)
public static Integer toInteger(Object obj, Locale locale)
public static Short toShort(Object obj)
public static Short toShort(Object obj, Locale locale)
public static Byte toByte(Object obj)
public static Byte toByte(Object obj, Locale locale)
public static Long toLong(Object obj)
public static Long toLong(Object obj, Locale locale)
public static Double toDouble(Object obj)
public static Double toDouble(Object obj, Locale locale)
public static Float toFloat(Object obj)
public static Float toFloat(Object obj, Locale locale)
public static BigDecimal toBigDecimal(Object obj)
public static BigDecimal toBigDecimal(Object obj, Locale locale)
public static Boolean toBoolean(Object obj)
public static Boolean toBoolean(Object obj, Locale locale)
public static Date toSqlDate(Object obj)
public static Date toSqlDate(Object obj, Locale locale)
public static Date toSqlDate(Object obj, Locale locale, String zoneStr)
public static Time toTime(Object obj)
public static Time toTime(Object obj, Locale locale)
public static Time toTime(Object obj, Locale locale, String zoneStr)
public static Timestamp toTimestamp(Object obj)
public static Timestamp toTimestamp(Object obj, Locale locale)
public static Timestamp toTimestamp(Object obj, Locale locale, String zoneStr)
public static byte[] toByteArray(Object obj)
public static byte[] toByteArray(Object obj, Locale locale)
public static String[] toStringArray(Vector v)
public static Integer[] toIntegerArray(int[] arr)
public static Object toClassInstance(Object obj, Class c)
public static Object toClassInstance(Object obj, Class c, Locale locale)
public static Object toClassInstance(Object obj, Class c, Locale locale, String zoneStr)
public static int toInt(Object obj)
public static int toPrimitiveInteger(Object obj)
public static boolean toPrimitiveBoolean(Object obj)
public static double toPrimitiveDouble(Object obj)
public static long toPrimitiveLong(Object obj)
public static Object toType(Object obj, char datatypecode)
obj
- Object to be converteddatatypecode
- com.sssw.fw.util.EboDatatypeCodes.java character value
representing the datatype to which obj should be converted.public static Object toType(Object obj, char datatypecode, Locale locale)
obj
- Object to be converteddatatypecode
- com.sssw.fw.util.EboDatatypeCodes.java character value
representing the datatype to which obj should be converted.locale
- Locale to use in coverting to specified datatypepublic static Object toType(Object obj, char datatypecode, Locale locale, String zoneStr)
obj
- Object to be converteddatatypecode
- com.sssw.fw.util.EboDatatypeCodes.java character value
representing the datatype to which obj should be converted.locale
- Locale to use in coverting to specified datatypezoneStr
- Time zone string for date/time conversionspublic static boolean equals(Object obj1, Object obj2)
public static boolean equals(Object obj1, Object obj2, Locale locale)
public static boolean equals(Object obj1, Object obj2, Locale locale, String zoneStr)
|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |