Code example for TreeMap

Methods: lastKeyputremovesize

0
     *  
     * @param bitmapKey 
     * @param aBitmap 
     */ 
    private void putInCache(String bitmapKey, Bitmap aBitmap) {
        if ( mFileCache.size() >= mMaxCacheCount ) {
            // An explicit ordering (by time) would make this a bit more 
            // relevant 
            String lastKey = mFileCache.lastKey();
            mFileCache.remove( lastKey );
        } 
        mFileCache.put( bitmapKey, aBitmap );
    } 
 
    private Bitmap retrieveBitmapFromFile(String bitmapKey)
            throws FileNotFoundException { 
        FileInputStream is = mContext.openFileInput( bitmapKey );
        return BitmapFactory.decodeStream( is );
    } 
 
Contextual code suggestions in your IDE  Get Codota for Java