Java tutorial
//package com.java2s; import android.os.Bundle; public class Main { /** * Removes object from the bundle. * * @param clazz of object * @param bundle to get from * @param <T> type of object */ public static <T> void removeFromBundle(Class<T> clazz, Bundle bundle) { if (bundle != null) { bundle.remove(clazz.getSimpleName()); } } }