public class Translator extends Translations
| Modifier and Type | Method and Description |
|---|---|
static int |
bigDecimal2Int(java.math.BigDecimal bd)
Convert from BigDecimal to int
|
static java.lang.Integer |
bigDecimal2IntObject(java.math.BigDecimal bd)
Convert from BigDecimal to Integer
|
static long |
bigDecimal2Long(java.math.BigDecimal bd)
Convert from BigDecimal to long
|
static java.lang.Long |
bigDecimal2LongObj(java.math.BigDecimal bd)
Convert from BigDecimal to Long
|
static boolean |
boolean2boolean(java.lang.Boolean b)
Convert from a Boolean to a boolean
|
static java.lang.String |
boolean2String(java.lang.Boolean b)
Convert from Boolean to String.
|
static java.lang.Object |
convert(java.lang.Object have,
java.lang.Class want)
Translate from from one object type to another.
|
static java.lang.String |
date2String(java.util.Date d)
Convert from Date to String.
|
static java.lang.String |
double2String(java.lang.Double d)
Convert from Double to String.
|
static boolean |
int2Boolean(java.lang.Integer i)
Convert an Integer object to a boolean
|
static java.util.List |
int2List(java.lang.Integer i)
Convert an Integer object into a list containing the integer
|
static java.lang.String |
int2String(java.lang.Integer i)
Convert an Integer object into a String
|
static java.lang.String |
list2String(java.util.List l)
Converts a List to a String
|
static boolean |
long2Boolean(java.lang.Long i)
Convert an Long object to a boolean
|
static int |
long2Int(java.lang.Long l)
Converts a Long to an int if needed.
|
static java.lang.Integer |
long2Integer(java.lang.Long l)
Converts a Long to an Integer if needed.
|
static long |
long2Objlong(java.lang.Long l)
Convert from Long to long
|
static User |
long2User(java.lang.Integer l)
Convert from Integer to User
|
static java.lang.String |
map2String(java.util.Map m)
Converts a Map to a String.
|
static boolean |
string2boolean(java.lang.String str)
Convert from String to boolean.
|
convertpublic static java.lang.Object convert(java.lang.Object have,
java.lang.Class want)
have - The object to convertwant - The Class to convert to.public static java.lang.String int2String(java.lang.Integer i)
i - the integer to convertpublic static java.util.List int2List(java.lang.Integer i)
i - The integer to add to the listpublic static boolean int2Boolean(java.lang.Integer i)
i - Integer to check. 1 = true, anything else = falsepublic static boolean long2Boolean(java.lang.Long i)
i - Long to check. 1 = true, anything else = falsepublic static User long2User(java.lang.Integer l) throws java.lang.Exception
l - The Long to convertjava.lang.Exception - if anything goes wrong while doing the conversion.public static long long2Objlong(java.lang.Long l)
throws java.lang.Exception
l - The Long to convertjava.lang.Exception - if anything goes wrong while doing the conversion.public static java.lang.Integer long2Integer(java.lang.Long l)
l - Long object to bepublic static int long2Int(java.lang.Long l)
l - Long object to bepublic static int bigDecimal2Int(java.math.BigDecimal bd)
throws java.lang.Exception
bd - The BigDecimal to convertjava.lang.Exception - if anything goes wrong while doing the conversion.public static java.lang.Integer bigDecimal2IntObject(java.math.BigDecimal bd)
throws java.lang.Exception
bd - The BigDecimal to convertjava.lang.Exception - if anything goes wrong while doing the conversion.public static long bigDecimal2Long(java.math.BigDecimal bd)
throws java.lang.Exception
bd - The BigDecimal to convertjava.lang.Exception - if anything goes wrong while doing the conversion.public static java.lang.Long bigDecimal2LongObj(java.math.BigDecimal bd)
throws java.lang.Exception
bd - The BigDecimal to convertjava.lang.Exception - if anything goes wrong while doing the conversion.public static boolean string2boolean(java.lang.String str)
throws java.lang.Exception
str - The string to convertjava.lang.Exception - if anything goes wrong while doing the conversion.public static java.lang.String double2String(java.lang.Double d)
d - The double to convertpublic static java.lang.String list2String(java.util.List l)
l - list to be convertedpublic static java.lang.String map2String(java.util.Map m)
m - map to be convertedpublic static java.lang.String boolean2String(java.lang.Boolean b)
b - The Boolean to convertpublic static java.lang.String date2String(java.util.Date d)
d - Date to convertpublic static boolean boolean2boolean(java.lang.Boolean b)
b - the Boolean to convert