org.aksw.commons.util.reflect
Class Caster
java.lang.Object
org.aksw.commons.util.reflect.Caster
public class Caster
- extends Object
Utility class for common casts.
TODO Make this more configurable.
- Author:
- Claus Stadler
Date: 9/17/11
Time: 5:31 PM
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Caster
public Caster()
tryCast
public static Object tryCast(Object value,
Class<?> targetClass)
main
public static void main(String[] args)
toString
public static String toString(Object o)
toBoolean
public static Boolean toBoolean(String a)
toInteger
public static Integer toInteger(Long a)
toInteger
public static Integer toInteger(Float a)
toInteger
public static Integer toInteger(Double a)
toInteger
public static Integer toInteger(String a)
toLong
public static Long toLong(Integer a)
toLong
public static Long toLong(Float a)
toLong
public static Long toLong(Double a)
toLong
public static Long toLong(String a)
toFloat
public static Float toFloat(Long a)
toFloat
public static Float toFloat(Integer a)
toFloat
public static Float toFloat(Double a)
toFloat
public static Float toFloat(String s)
toDouble
public static Double toDouble(Integer a)
toDouble
public static Double toDouble(Long a)
toDouble
public static Double toDouble(Float a)
toDouble
public static Double toDouble(String a)
Copyright © 2012. All Rights Reserved.