LruCache remove - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for LruCache remove method.

This code example shows how to use the following methods:get, put, remove
	} 
 
	public Bitmap getBitmap(long key) {
		Bitmap bm = getFolderBitmap(key);
		if (bm != null) return bm;
		return mContentCache.get(key);
	} 
	 
	public void clearAll() { 
		clearContent(); 
		clearFolder(); 
	} 
	 
	public void clearContent() { 
		mContentCache.evictAll();
	} 
	 
	public void clearFolder() { 
		mFolderCache.evictAll();
	} 

7
CodeRank
This code example shows how to use the following methods:get, remove
        if (getBitmapFromMemCache(key) == null)
            mMemoryCashe.put(key, BitmapFactory.decodeFile(key));
    } 
 
    public Bitmap getBitmapFromMemCache(String key){
        return mMemoryCashe.get(key);
    } 
 
    public void clearBitmapToMemoryCache(String key){
        if (getBitmapFromMemCache(key) != null)
            mMemoryCashe.remove(key);
    } 
 
    @Override 
    public int getCount() { 
        return listNamePhoto.size();
    } 
 
    @Override 
    public Object getItem(int i) {
4
CodeRank
This code example shows how to use the following methods:remove
    public static ApplicationInfo getCachedApplicationInfo(final String packageName) {
        if (null == packageName) return null;
        return sCache.get(packageName);
    } 
    public static void removeApplicationInfoCache(final String packageName) {
        sCache.remove(packageName);
    } 
 
    public interface OnTargetApplicationKnownListener { 
        public void onTargetApplicationKnown(final ApplicationInfo info);
    } 
 
    private Context mContext;
    private final OnTargetApplicationKnownListener mListener;
 
    public TargetApplicationGetter(final Context context,
            final OnTargetApplicationKnownListener listener) {
        mContext = context;
        mListener = listener;
    } 
4
CodeRank
This code example shows how to use the following methods:remove
 
        // Do we already have this fragment? 
        String name = makeFragmentName(container.getId(), position);
 
        // Remove item from the cache 
        mFragmentCache.remove(name);
 
        Fragment fragment = mFragmentManager.findFragmentByTag(name);
        if (fragment != null) {
            if (DEBUG) Log.v(TAG, "Attaching item #" + position + ": f=" + fragment);
            mCurTransaction.attach(fragment);
        } else { 
            fragment = getItem(position);
            if (DEBUG) Log.v(TAG, "Adding item #" + position + ": f=" + fragment);
            mCurTransaction.add(container.getId(), fragment,
                    makeFragmentName(container.getId(), position));
        } 
        if (fragment != mCurrentPrimaryItem) {
            fragment.setMenuVisibility(false);
        } 
4
CodeRank
This code example shows how to use the following methods:remove
        return null; 
    } 
 
    public void remove(final String key) {
        if (mLruCache != null) {
            mLruCache.remove(key);
        } 
    } 
     
    public void clearMemCache() { 
        if (mLruCache != null) {
            mLruCache.evictAll();
        } 
        System.gc();
    } 
 
    public static final class RetainFragment extends Fragment {
 
        private Object mObject;
 
4
CodeRank
This code example shows how to use the following methods:remove
        if (null == packageName) return null;
        return sCache.get(packageName);
    } 
 
    public static void removeApplicationInfoCache(final String packageName) {
        sCache.remove(packageName);
    } 
 
    public interface OnTargetApplicationKnownListener { 
        public void onTargetApplicationKnown(final ApplicationInfo info);
    } 
 
    private Context mContext;
    private final OnTargetApplicationKnownListener mListener;
 
    public TargetApplicationGetter(final Context context,
            final OnTargetApplicationKnownListener listener) {
        mContext = context;
        mListener = listener;
    } 
4
CodeRank
This code example shows how to use the following methods:remove
    public static ApplicationInfo getCachedApplicationInfo(final String packageName) {
        if (null == packageName) return null;
        return sCache.get(packageName);
    } 
    public static void removeApplicationInfoCache(final String packageName) {
        sCache.remove(packageName);
    } 
 
    public interface OnTargetApplicationKnownListener { 
        public void onTargetApplicationKnown(final ApplicationInfo info);
    } 
 
    private Context mContext;
    private final OnTargetApplicationKnownListener mListener;
 
    public TargetApplicationGetter(final Context context,
            final OnTargetApplicationKnownListener listener) {
        mContext = context;
        mListener = listener;
    } 
4
CodeRank
This code example shows how to use the following methods:remove
    public static ApplicationInfo getCachedApplicationInfo(final String packageName) {
        if (null == packageName) return null;
        return sCache.get(packageName);
    } 
    public static void removeApplicationInfoCache(final String packageName) {
        sCache.remove(packageName);
    } 
 
    public interface OnTargetApplicationKnownListener { 
        public void onTargetApplicationKnown(final ApplicationInfo info);
    } 
 
    private Context mContext;
    private final OnTargetApplicationKnownListener mListener;
 
    public TargetApplicationGetter(final Context context,
            final OnTargetApplicationKnownListener listener) {
        mContext = context;
        mListener = listener;
    } 
4
CodeRank
remove Method Overview
Removes the entry for key if it exists.
See Code Examples for other Android LruCache Methods: