public final class Primitive extends Object
(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl/language
License of use: Lesser
General Public License (LGPL) , no warranty
Modifier and Type | Method and Description |
---|---|
static Object[] |
cast(Class[] classes,
Object[] values)
casts a set of values to classes
|
static Object |
cast(Class clazz,
Object object)
casts an object to a instance of clazz
|
static Class |
forName(String className)
returns the primitiveClass of the name given as defined by the Java VM
class constants.
|
static Class |
getPrimitive(Class wrapperClass)
gets the primitive of the given wrapperClass
|
static Class |
getWrapper(Class primitiveClass)
gets the wrapper of this primitive class
|
static Boolean |
toBoolean(Object object)
casts an object to Boolean
|
static Byte |
toByte(Object object)
casts an object to Byte
|
static Character |
toCharacter(Object object)
casts an object to Character
|
static Double |
toDouble(Object object)
casts an object to Double
|
static Float |
toFloat(Object object)
casts an object to Float
|
static Integer |
toInteger(Object object)
casts an object to Integer
|
static Long |
toLong(Object object)
casts an object to Long
|
static Short |
toShort(Object object)
casts an object to Short
|
public static Object[] cast(Class[] classes, Object[] values)
classes
- the classes to cast tovalues
- the valuespublic static Object cast(Class clazz, Object object)
clazz
- the class to cast toobject
- the object to castpublic static Class forName(String className)
className
- the classNamepublic static Class getPrimitive(Class wrapperClass)
wrapperClass
- the wrapper classpublic static Class getWrapper(Class primitiveClass)
primitiveClass
- the primitive classpublic static Boolean toBoolean(Object object)
object
- the objectpublic static Byte toByte(Object object)
object
- the objectpublic static Character toCharacter(Object object)
object
- the object to parsepublic static Double toDouble(Object object)
object
- the object to parsepublic static Float toFloat(Object object)
object
- the object to parsepublic static Long toLong(Object object)
object
- the object to parsepublic static Short toShort(Object object)
object
- the object to parseCopyright © 2002-2012 Delft University of Technology, the Netherlands. All Rights Reserved.