Code example for WeakHashMap

public final class AnimatorProxy extends Animation {
    /** Whether or not the current running platform needs to be proxied. */ 
    public static final boolean NEEDS_PROXY = Integer.valueOf(Build.VERSION.SDK).intValue() < Build.VERSION_CODES.HONEYCOMB;
    private static final WeakHashMap<View, AnimatorProxy> PROXIES =
            new WeakHashMap<View, AnimatorProxy>();
     * Create a proxy to allow for modifying post-3.0 view properties on all 
     * pre-3.0 platforms. <strong>DO NOT</strong> wrap your views if you are 
     * using {@code ObjectAnimator} as it will handle that itself. 
     * @param view View to wrap. 
     * @return Proxy to post-3.0 properties. 
    public static AnimatorProxy wrap(View view) {
        AnimatorProxy proxy = PROXIES.get(view);
        // This checks if the proxy already exists and whether it still is the animation of the given view 
        if (proxy == null || proxy != view.getAnimation()) {
            proxy = new AnimatorProxy(view);