package com.alapshin.arctor.presenter;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;

import java.util.HashMap;

public class PresenterBundleUtil {
    private static final String MAP_KEY = PresenterBundle.class.getName();
    private static final String LOG_TAG = PresenterBundleUtil.class.getSimpleName();

    private PresenterBundleUtil() {
        // No instances
    }

    /**
     * Read {@link PresenterBundle} from android {@link Bundle}
     * @param savedInstanceState android bundle
     * @return presenter bundle
     */
    @SuppressWarnings("unchecked") // Handled internally
    public static PresenterBundle getPresenterBundle(@Nullable Bundle savedInstanceState) {
        HashMap<String, Object> map = new HashMap<>();

        if (savedInstanceState != null) {
            try {
                map = (HashMap<String, Object>) savedInstanceState
                        .getSerializable(MAP_KEY);
                return new PresenterBundle(map);
            } catch (ClassCastException e) {
                Log.e(LOG_TAG, "getPresenterBundle", e);
            }
        }

        return null;
    }

    /**
     * Write {$link PresenterBundle} to android {@link Bundle}
     * @param outState android bundle
     * @param presenterBundle presenter bundle
     */
    public static void setPresenterBundle(Bundle outState, PresenterBundle presenterBundle) {
        outState.putSerializable(MAP_KEY, presenterBundle.getMap());
    }
}

@@ -731,63 +731,8 @@
 e) %7B
-%0A        HashMap%3CString, Object%3E map = new HashMap%3C%3E();
 %0A%0A  
@@ -804,16 +804,40 @@
         
+ HashMap%3CString, Object%3E
  map = (

Clean up util class