public class Converter
extends java.lang.Object
TypeConverterManager
usage.Constructor and Description |
---|
Converter() |
Modifier and Type | Method and Description |
---|---|
static Converter |
get()
Returns default instance.
|
java.math.BigDecimal |
toBigDecimal(java.lang.Object value)
Converts value to
BigDecimal . |
java.math.BigDecimal |
toBigDecimal(java.lang.Object value,
java.math.BigDecimal defaultValue)
Converts value to
BigDecimal . |
java.math.BigInteger |
toBigInteger(java.lang.Object value)
Converts value to
BigInteger . |
java.math.BigInteger |
toBigInteger(java.lang.Object value,
java.math.BigInteger defaultValue)
Converts value to
BigInteger . |
java.lang.Boolean |
toBoolean(java.lang.Object value)
Converts value to
Boolean . |
java.lang.Boolean |
toBoolean(java.lang.Object value,
java.lang.Boolean defaultValue)
Converts value to
Boolean . |
boolean[] |
toBooleanArray(java.lang.Object value)
Converts value to
boolean[] . |
boolean |
toBooleanValue(java.lang.Object value)
Converts value to
boolean with common default value. |
boolean |
toBooleanValue(java.lang.Object value,
boolean defaultValue)
Converts value to
boolean . |
java.lang.Byte |
toByte(java.lang.Object value)
Converts value to
Byte . |
java.lang.Byte |
toByte(java.lang.Object value,
java.lang.Byte defaultValue)
Converts value to
Byte . |
byte |
toByteValue(java.lang.Object value)
Converts value to
byte with common default value. |
byte |
toByteValue(java.lang.Object value,
byte defaultValue)
Converts value to
byte . |
java.lang.Character |
toCharacter(java.lang.Object value)
Converts value to
Character . |
java.lang.Character |
toCharacter(java.lang.Object value,
java.lang.Character defaultValue)
Converts value to
Character . |
char[] |
toCharacterArray(java.lang.Object value)
Converts value to
char[] . |
char |
toCharValue(java.lang.Object value)
Converts value to
char with common default value. |
char |
toCharValue(java.lang.Object value,
char defaultValue)
Converts value to
char . |
java.lang.Class |
toClass(java.lang.Object value)
Converts value to
Class . |
java.lang.Class[] |
toClassArray(java.lang.Object value)
Converts value to
Class[] . |
java.lang.Double |
toDouble(java.lang.Object value)
Converts value to
Double . |
java.lang.Double |
toDouble(java.lang.Object value,
java.lang.Double defaultValue)
Converts value to
Double . |
double[] |
toDoubleArray(java.lang.Object value)
Converts value to
double[] . |
double |
toDoubleValue(java.lang.Object value)
Converts value to
double with common default value. |
double |
toDoubleValue(java.lang.Object value,
double defaultValue)
Converts value to
double . |
java.lang.Float |
toFloat(java.lang.Object value)
Converts value to
Float . |
java.lang.Float |
toFloat(java.lang.Object value,
java.lang.Float defaultValue)
Converts value to
Float . |
float[] |
toFloatArray(java.lang.Object value)
Converts value to
float[] . |
float |
toFloatValue(java.lang.Object value)
Converts value to
float with common default value. |
float |
toFloatValue(java.lang.Object value,
float defaultValue)
Converts value to
float . |
java.lang.Integer |
toInteger(java.lang.Object value)
Converts value to
Integer . |
java.lang.Integer |
toInteger(java.lang.Object value,
java.lang.Integer defaultValue)
Converts value to
Integer . |
int[] |
toIntegerArray(java.lang.Object value)
Converts value to
int[] . |
int |
toIntValue(java.lang.Object value)
Converts value to
int with common default value. |
int |
toIntValue(java.lang.Object value,
int defaultValue)
Converts value to
int . |
java.lang.Long |
toLong(java.lang.Object value)
Converts value to
Long . |
java.lang.Long |
toLong(java.lang.Object value,
java.lang.Long defaultValue)
Converts value to
Long . |
long[] |
toLongArray(java.lang.Object value)
Converts value to
long[] . |
long |
toLongValue(java.lang.Object value)
Converts value to
long with common default value. |
long |
toLongValue(java.lang.Object value,
long defaultValue)
Converts value to
long . |
java.lang.Short |
toShort(java.lang.Object value)
Converts value to
Short . |
java.lang.Short |
toShort(java.lang.Object value,
java.lang.Short defaultValue)
Converts value to
Short . |
short[] |
toShortArray(java.lang.Object value)
Converts value to
short[] . |
short |
toShortValue(java.lang.Object value)
Converts value to
short with common default value. |
short |
toShortValue(java.lang.Object value,
short defaultValue)
Converts value to
short . |
java.lang.String |
toString(java.lang.Object value)
Converts value to
String . |
java.lang.String |
toString(java.lang.Object value,
java.lang.String defaultValue)
Converts value to
String . |
java.lang.String[] |
toStringArray(java.lang.Object value)
Converts value to
String[] . |
public static Converter get()
public java.lang.Boolean toBoolean(java.lang.Object value)
Boolean
.public java.lang.Boolean toBoolean(java.lang.Object value, java.lang.Boolean defaultValue)
Boolean
. Returns default value
when conversion result is null
public boolean toBooleanValue(java.lang.Object value, boolean defaultValue)
boolean
. Returns default value
when conversion result is null
.public boolean toBooleanValue(java.lang.Object value)
boolean
with common default value.public java.lang.Integer toInteger(java.lang.Object value)
Integer
.public java.lang.Integer toInteger(java.lang.Object value, java.lang.Integer defaultValue)
Integer
. Returns default value
when conversion result is null
public int toIntValue(java.lang.Object value, int defaultValue)
int
. Returns default value
when conversion result is null
.public int toIntValue(java.lang.Object value)
int
with common default value.public java.lang.Long toLong(java.lang.Object value)
Long
.public java.lang.Long toLong(java.lang.Object value, java.lang.Long defaultValue)
Long
. Returns default value
when conversion result is null
public long toLongValue(java.lang.Object value, long defaultValue)
long
. Returns default value
when conversion result is null
.public long toLongValue(java.lang.Object value)
long
with common default value.public java.lang.Float toFloat(java.lang.Object value)
Float
.public java.lang.Float toFloat(java.lang.Object value, java.lang.Float defaultValue)
Float
. Returns default value
when conversion result is null
public float toFloatValue(java.lang.Object value, float defaultValue)
float
. Returns default value
when conversion result is null
.public float toFloatValue(java.lang.Object value)
float
with common default value.public java.lang.Double toDouble(java.lang.Object value)
Double
.public java.lang.Double toDouble(java.lang.Object value, java.lang.Double defaultValue)
Double
. Returns default value
when conversion result is null
public double toDoubleValue(java.lang.Object value, double defaultValue)
double
. Returns default value
when conversion result is null
.public double toDoubleValue(java.lang.Object value)
double
with common default value.public java.lang.Short toShort(java.lang.Object value)
Short
.public java.lang.Short toShort(java.lang.Object value, java.lang.Short defaultValue)
Short
. Returns default value
when conversion result is null
public short toShortValue(java.lang.Object value, short defaultValue)
short
. Returns default value
when conversion result is null
.public short toShortValue(java.lang.Object value)
short
with common default value.public java.lang.Character toCharacter(java.lang.Object value)
Character
.public java.lang.Character toCharacter(java.lang.Object value, java.lang.Character defaultValue)
Character
. Returns default value
when conversion result is null
public char toCharValue(java.lang.Object value, char defaultValue)
char
. Returns default value
when conversion result is null
.public char toCharValue(java.lang.Object value)
char
with common default value.public java.lang.Byte toByte(java.lang.Object value)
Byte
.public java.lang.Byte toByte(java.lang.Object value, java.lang.Byte defaultValue)
Byte
. Returns default value
when conversion result is null
public byte toByteValue(java.lang.Object value, byte defaultValue)
byte
. Returns default value
when conversion result is null
.public byte toByteValue(java.lang.Object value)
byte
with common default value.public boolean[] toBooleanArray(java.lang.Object value)
boolean[]
.public int[] toIntegerArray(java.lang.Object value)
int[]
.public long[] toLongArray(java.lang.Object value)
long[]
.public float[] toFloatArray(java.lang.Object value)
float[]
.public double[] toDoubleArray(java.lang.Object value)
double[]
.public short[] toShortArray(java.lang.Object value)
short[]
.public char[] toCharacterArray(java.lang.Object value)
char[]
.public java.lang.String toString(java.lang.Object value)
String
.public java.lang.String toString(java.lang.Object value, java.lang.String defaultValue)
String
. Returns default value
when conversion result is null
public java.lang.String[] toStringArray(java.lang.Object value)
String[]
.public java.lang.Class toClass(java.lang.Object value)
Class
.public java.lang.Class[] toClassArray(java.lang.Object value)
Class[]
.public java.math.BigInteger toBigInteger(java.lang.Object value)
BigInteger
.public java.math.BigInteger toBigInteger(java.lang.Object value, java.math.BigInteger defaultValue)
BigInteger
. Returns default value
when conversion result is null
public java.math.BigDecimal toBigDecimal(java.lang.Object value)
BigDecimal
.public java.math.BigDecimal toBigDecimal(java.lang.Object value, java.math.BigDecimal defaultValue)
BigDecimal
. Returns default value
when conversion result is null
Copyright © 2003-present Jodd Team