Package com.polarion.core.util.types
Class ConversionHelper
java.lang.Object
com.polarion.core.util.types.ConversionHelper
Deprecated, for removal: This API element is subject to removal in a future version.
Helper for type conversions.
The general contract applied for the conversion methods of this class is that
- when
object
isnull
,defaultValue
is returned - when
object
is an instance of the desired type, reference to it is returned - when the conversion fails,
defaultValue
is returned null
is returned only in the case when bothobject
anddefaultValue
are null
- Version:
- $Revision: 1.3 $ $Date: 2003/12/29 18:58:51 $
- Author:
- Ondrej Chylik, Polarion Software
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
getBoolean
(Object object, boolean defaultValue) Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive boolean type.static Boolean
getBoolean
(Object object, Boolean defaultValue) Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toBoolean
.static byte
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive byte type.static Byte
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toByte
.static double
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive double type.static Double
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toDouble
.static float
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive float type.static Float
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toFloat
.static int
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive int type.static Integer
getIntenger
(Object object, Integer defaultValue) Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toInteger
.static long
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive long type.static Long
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toLong
.static Object
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to the specified type.static short
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive short type.static Short
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toShort
.static String
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to string.
-
Method Details
-
getString
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to string. -
getObject
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to the specified type.Note: Default value which is not an instance of the given type is an invalid argument for this method.
-
getBoolean
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive boolean type. String to boolean conversion applies to values"true"
,"on"
or"yes"
and"false"
,"off"
or"no"
, case insensitive. -
getInt
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive int type. Applies to any instance ofNumber
or to strings. -
getLong
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive long type. Applies to any instance ofNumber
or to strings. -
getFloat
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive float type. Applies to any instance ofNumber
or to strings. -
getDouble
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive double type. Applies to any instance ofNumber
or to strings. -
getByte
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive byte type. Applies to any instance ofNumber
or to strings. -
getShort
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object to primitive short type. Applies to any instance ofNumber
or to strings. -
getBoolean
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toBoolean
. String to boolean conversion applies to values"true"
,"on"
or"yes"
and"false"
,"off"
or"no"
, case insensitive. -
getIntenger
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toInteger
. Applies to any instance ofNumber
or to strings. -
getLong
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toLong
. Applies to any instance ofNumber
or to strings. -
getFloat
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toFloat
. Applies to any instance ofNumber
or to strings. -
getDouble
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toDouble
. Applies to any instance ofDouble
or to strings. -
getByte
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toByte
. Applies to any instance ofNumber
or to strings. -
getShort
Deprecated, for removal: This API element is subject to removal in a future version.Converts an object toShort
. Applies to any instance ofNumber
or to strings.
-