Returns whether the image is stored in the bitmap memory cache.

@param imageRequest the imageRequest for the image to be looked up.
@return true if the image was found in the bitmap memory cache, false otherwise.
182917
public boolean isInBitmapMemoryCache(final ImageRequest imageRequest) {
    if (imageRequest == null) {
      return false;
    }
    final CacheKey cacheKey = mCacheKeyFactory.getBitmapCacheKey(imageRequest, null);
    CloseableReference<CloseableImage> ref = mBitmapMemoryCache.get(cacheKey);
    try {
      return CloseableReference.isValid(ref);
    } finally {
      CloseableReference.closeSafely(ref);
    }
  }
795663
public boolean remove(final CacheKey key) {
    Preconditions.checkNotNull(key);
    final EncodedImage encodedImage;
    synchronized (this) {
      encodedImage = mMap.remove(key);
    }
    if (encodedImage == null) {
      return false;
    }
    try {
      return encodedImage.isValid();
    } finally {
      encodedImage.close();
    }
  }
851859
private boolean hasBeenAllImagesStarted(Queue<ImageConfiguration> imagesWaitingToStart, Queue<ImageConfiguration> imagesStarting) {
        return imagesWaitingToStart.isEmpty() && imagesStarting.isEmpty();
    }
1123796
private boolean isForGerritHost(HttpRequest request) {
        if (!(request instanceof HttpRequestWrapper)) return false;
        HttpRequest originalRequest = ((HttpRequestWrapper) request).getOriginal();
        if (!(originalRequest instanceof HttpRequestBase)) return false;
        URI uri = ((HttpRequestBase) originalRequest).getURI();
        URI authDataUri = URI.create(authData.getHost());
        if (uri == null || uri.getHost() == null) return false;
        boolean hostEquals = uri.getHost().equals(authDataUri.getHost());
        boolean portEquals = uri.getPort() == authDataUri.getPort();
        return hostEquals && portEquals;
    }
486098
public static boolean isSourceMapsEnabled(HttpServletRequest request) {
		IAggregator aggr = (IAggregator)request.getAttribute(IAggregator.AGGREGATOR_REQATTRNAME);
		IOptions options = aggr.getOptions();
		boolean result = false;
		if (options.isSourceMapsEnabled()) {
			result = TypeUtil.asBoolean(request.getAttribute(IHttpTransport.GENERATESOURCEMAPS_REQATTRNAME));
		}
		return result;
	}
684654
public void evictFromDiskCache(final ImageRequest imageRequest) {
    CacheKey cacheKey = mCacheKeyFactory.getEncodedCacheKey(imageRequest, null);
    mMainBufferedDiskCache.remove(cacheKey);
    mSmallImageBufferedDiskCache.remove(cacheKey);
  }
1149467
public boolean hasCache() {
        if (isCache()) {
            return true;
        }
        if (CommonUtils.isNotEmpty(methods)) {
            for (MethodConfig methodConfig : methods.values()) {
                if (CommonUtils.isTrue(methodConfig.getCache())) {
                    return true;
                }
            }
        }
        return false;
    }
1188906
private function isImage()
    {
        if ($this->metadata->isFile() &&
            mb_strpos($this->metadata->getMimeType(), 'image/') === 0
        ) {
            return true;
        }

        return false;
    }
361540
public static boolean isMultipart(HttpServletRequest request) {
		if (false == isPostMethod(request)) {
			return false;
		}

		String contentType = request.getContentType();
		if (StrUtil.isBlank(contentType)) {
			return false;
		}
		if (contentType.toLowerCase().startsWith("multipart/")) {
			return true;
		}

		return false;
	}
786941
public void setImageRequest(ImageRequest request) {
    AbstractDraweeControllerBuilder controllerBuilder = mControllerBuilder;
    DraweeController controller =
        controllerBuilder.setImageRequest(request).setOldController(getController()).build();
    setController(controller);
  }
428474
private function isLocalFile()
    {
        try {
            if (file_exists(storage_path('app/'.$this->location))) {
                return true;
            }
        } catch (Exception $e) {
            Log::debug('Could not find the image');

            return false;
        }

        return false;
    }
856069
private boolean isCached(I_CmsLruCacheObject theCacheObject) {

        if ((theCacheObject == null) || (m_objectCount == 0)) {
            // the cache is empty or the object is null (which is never cached)
            return false;
        }

        I_CmsLruCacheObject nextObj = theCacheObject.getNextLruObject();
        I_CmsLruCacheObject prevObj = theCacheObject.getPreviousLruObject();

        if ((nextObj != null) || (prevObj != null)) {
            // the object has either a predecessor or successor in the linked
            // list of all cached objects, so it is inside the cache
            return true;
        }

        // both nextObj and preObj are null
        if ((m_objectCount == 1)
            && (m_listHead != null)
            && (m_listTail != null)
            && m_listHead.equals(theCacheObject)
            && m_listTail.equals(theCacheObject)) {
            // the object is the one and only object in the cache
            return true;
        }

        return false;
    }
1233695
private boolean isJawrImageTag(ComponentTag tag) {
		String tagName = tag.getName();
		return (tagName.equalsIgnoreCase("img") || (tagName
				.equalsIgnoreCase("input") && tag.getAttribute("type").equals(
				"image")));
	}
383109
private boolean isValidImage(final String imageKeyword, final Double score) {
    return !StringUtils.isBlank(imageKeyword)
           || score != null;
  }
369751
private Bitmap loadFromLruCache(final String path, boolean tryFromDisk) {

        int key = getKey(path);

        Bitmap bitmap = mImagesCache.get(key); //try to retrieve from lruCache

        Log.d(TAG, "bitmap " + path + " from lruCache [" + key + "] " + bitmap);

        if (tryFromDisk && bitmap == null) {
            bitmap = loadFromDiskLruCache(key); //try to retrieve from disk cache

            Log.d(TAG, "bitmap " + path + " from diskLruCache " + bitmap);
            if (bitmap != null) { //if found on disk cache
                mImagesCache.put(key, bitmap); //save it into lruCache
            }
        }

        return bitmap;
    }
415383
private boolean checkInStagingAreaAndFileCache(final CacheKey key) {
    EncodedImage result = mStagingArea.get(key);
    if (result != null) {
      result.close();
      FLog.v(TAG, "Found image for %s in staging area", key.getUriString());
      mImageCacheStatsTracker.onStagingAreaHit(key);
      return true;
    } else {
      FLog.v(TAG, "Did not find image for %s in staging area", key.getUriString());
      mImageCacheStatsTracker.onStagingAreaMiss();
      try {
        return mFileCache.hasKey(key);
      } catch (Exception exception) {
        return false;
      }
    }
  }
1083680
public void run() {
        // TODO: if we had a way to check for in-memory hits, we could improve performance by
        // fetching an image from the in-memory cache on the main thread
        Bitmap bitmap = imageCache.getBitmap(imageUrl);

        if (bitmap == null) {
            bitmap = downloadImage();
        }

        // TODO: gracefully handle this case.
        notifyImageLoaded(imageUrl, bitmap);

    }