Back to project page jive-android-core-sdk-example.
The source code is released under:
Apache License
If you think the Android project jive-android-core-sdk-example 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 com.jivesoftware.example.destroyer; // w ww .jav a 2 s. c o m /** * Created by mark.schisler on 4/30/14. */ public class Destroyer { public static void destroy(IDestroyable... destroyables) { for ( IDestroyable destroyable : destroyables ) { if ( destroyable != null ) { destroyable.destroy(); } } } public static <T> T destroyAndReturn(IDestroyable destroyable, IDestroyable returnable) { if ( destroyable != null ) { destroyable.destroy(); } return (T)returnable; } }