Code example for WeakHashMap

public final class AnimatorProxy extends Animation {
    public static final boolean NEEDS_PROXY = Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB;
    private static final WeakHashMap<View, AnimatorProxy> PROXIES =
            new WeakHashMap<View, AnimatorProxy>();
    public static AnimatorProxy wrap(View view) {
        AnimatorProxy proxy = PROXIES.get(view);
        if (proxy == null) {
            proxy = new AnimatorProxy(view);
            PROXIES.put(view, proxy);
        return proxy;
    private final WeakReference<View> mView;
    private float mAlpha = 1;
    private float mScaleX = 1;
Connect your IDE to all the code out there  Get Codota for Java