Class TypeConverter
- java.lang.Object
-
- io.streamthoughts.azkarra.api.util.TypeConverter
-
- All Implemented Interfaces:
Serializable
public class TypeConverter extends Object implements Serializable
Class which can be used to convert an object to a specific type.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TypeConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BooleangetBool(Object value)static byte[]getBytes(Object value)static DategetDate(Object value)static DoublegetDouble(Object value)static FloatgetFloat(Object value)static IntegergetInt(Object value)static CollectiongetList(Object value)static LonggetLong(Object value)static ShortgetShort(Object value)static StringgetString(Object value)
-
-
-
Method Detail
-
getList
public static Collection getList(Object value) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getBool
public static Boolean getBool(Object value) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getShort
public static Short getShort(Object value) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getInt
public static Integer getInt(Object value) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getLong
public static Long getLong(Object value) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getFloat
public static Float getFloat(Object value) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getDouble
public static Double getDouble(Object value) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getDate
public static Date getDate(Object value) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getBytes
public static byte[] getBytes(Object value)
-
-