Back to project page sami-android-demo.
The source code is released under:
Apache License
If you think the Android project sami-android-demo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package io.samsungsami.android.api; //from ww w . ja v a 2s . co m public class Cast { /** * Serves as conversion between the Object based Api Task * and the models from the Swagger client * @param clazz * @param result * @return */ public static <T> T as(Class<T> clazz, Object result){ try { if(result != null){ return (T) result; } else { return null; } } catch (ClassCastException e){ e.printStackTrace(); return null; } } }