Determine if an valid entry for the key exists in the staging area.
428210
public synchronized boolean containsKey(CacheKey key) {
    Preconditions.checkNotNull(key);
    if (!mMap.containsKey(key)) {
      return false;
    }
    EncodedImage storedEncodedImage = mMap.get(key);
    synchronized (storedEncodedImage) {
      if (!EncodedImage.isValid(storedEncodedImage)) {
        // Reference is not valid, this means that someone cleared reference while it was still in
        // use. Log error
        // TODO: 3697790
        mMap.remove(key);
        FLog.w(
            TAG,
            "Found closed reference %d for key %s (%d)",
            System.identityHashCode(storedEncodedImage),
            key.getUriString(),
            System.identityHashCode(key));
        return false;
      }
      return true;
    }
  }
75795
public boolean checkExists(TriggerKey triggerKey, T jedis){
        return jedis.exists(redisSchema.triggerHashKey(triggerKey));
    }
1339011
def contains(self, key):
        """"""
        if self._jconf is not None:
            return self._jconf.contains(key)
        else:
            return key in self._conf
1100596
def is_valid_key(key):
    

    if PY3 and isinstance(key, bytes):
        raise TypeError("needs to be str not bytes")

    for c in key:
        if c < " " or c > "}" or c == "=":
            return False
    else:
        return bool(key)
533046
function isRevalidatingCacheKey (ctx, currentEntryKey) {
  const revalidatingCache = ctx.locals.revalidatingCache
  return (revalidatingCache && revalidatingCache.entryKey) === currentEntryKey
}
1078500
public static boolean isValid(String entry) {
		boolean result = true;

		try {
			shouldRun(entry);
		} catch (Exception ex) {
			result = false;
		}
		return result;
	}
1230751
def exist?(key, options = {})
      invoke(:exist?, key) do |store|
        store.exists(namespaced_key(key, merged_options(options)))
      end
    end
1078660
def has_key?(key, opts={})
      key = normalize_key(key) if opts.fetch(:normalize, true)
      @source.has_key?(key)
    end
26886
private void checkKey(final byte[] key) {
		if (theBinaryKey.get() != null) {
			verifyKey(key);
		} else {
			boolean success = theBinaryKey.compareAndSet(null, key);
			if (!success) {
				// someone already beat us to it. that's fine, just verify
				// that the key is the same
				verifyKey(key);
			} else {
				pipelined(key);
			}
		}
	}
378084
def contains(self, key):
        
        n = binascii.crc32(key.encode()) % RING_SIZE
        for start, end in self.ranges:
            if start <= n < end:
                return True
        return False
985377
public boolean containsKey(Object key)
    {
        purge();
        Entry entry = getEntry(key);
        if (entry == null) return false;
        return entry.getValue() != null;
    }
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;
      }
    }
  }
985542
private synchronized boolean maybeAddToExclusives(Entry<K, V> entry) {
    if (!entry.isOrphan && entry.clientCount == 0) {
      mExclusiveEntries.put(entry.key, entry);
      return true;
    }
    return false;
  }
166644
def _check_valid_key(self, key):
        
        if not isinstance(key, key_type):
            raise ValueError('%r is not a valid key type' % key)
        if not VALID_KEY_RE.match(key):
            raise ValueError('%r contains illegal characters' % key)
19773
def exists(self, key, **opts):
        """"""
        key, store = self._expand_opts(key, opts)
        data = store.get(key)
        # Note that we do not actually delete the thing here as the max_age
        # just for this call may have triggered a False.
        if not data or self._has_expired(data, opts):
            return False
        return True
662639
public boolean containsKey(Object key) {
        if (key == null) {
            return false;
        }

        Entry tab[] = mTable;
        int hash = System.identityHashCode(key);
        int index = (hash & 0x7FFFFFFF) % tab.length;

        for (Entry e = tab[index], prev = null; e != null; e = e.mNext) {
            Object entryKey = e.getKey();

            if (entryKey == null) {
                // Clean up after a cleared Reference.
                mModCount++;
                if (prev != null) {
                    prev.mNext = e.mNext;
                }
                else {
                    tab[index] = e.mNext;
                }
                mCount--;
            }
            else if (e.mHash == hash && key == entryKey) {
                return true;
            }
            else {
                prev = e;
            }
        }

        return false;
    }
1190953
public boolean containsKey(Object key)
    {
        if (key==null)
            return _nullEntry!=null;
        return
            getEntry(key.toString(),0,key==null?0:key.toString().length())!=null;
    }