Determines, if the node is available. If it's not cached, it's loaded
from the cache loader.

@param key
the key to check
@return <code>true</code> if the node is marked as available.
425438
public boolean isNodeAvailable( @Nonnull final K key ) {
        final ManagedItem<Boolean> item = _map.get( key );
        if ( item == null ) {
            return updateIsNodeAvailable( key );
        } else if ( isExpired( item ) ) {
            _map.remove( key );
            return updateIsNodeAvailable( key );
        } else {
            return item._value;
        }
    }
186109
public boolean exists(String key) throws Exception {
        boolean isExist = false;
        Jedis jedis = null;
        try {
            jedis = this.jedisPool.getResource();
            isExist = jedis.exists(SafeEncoder.encode(key));

        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            this.jedisPool.returnBrokenResource(jedis);
            throw e;
        } finally {
            if (jedis != null) {
                this.jedisPool.returnResource(jedis);
            }
        }
        return isExist;
    }
1035856
public boolean isAssignableFrom(Key<? super T> key)
  {
    Objects.requireNonNull(key);

    for (Class<? extends Annotation> annType : _annTypes) {
      if (! containsType(annType, key._annTypes)) {
        return false;
      }
    }

    if (_type instanceof ParameterizedType) {
      if (! (key._type instanceof ParameterizedType)) {
        return false;
      }

      if (! isAssignableFrom((ParameterizedType) _type,
                             (ParameterizedType) key._type)) {
        return false;
      }
    }

    if (_anns.length > 0 && key._anns.length > 0) {
      return isAssignableFrom(_anns, key._anns);
    }

    return true;
  }
1164335
public void hasLastKey(@NullableDecl Object key) {
    if (actualAsNavigableMap().isEmpty()) {
      failWithActual("expected to have last key", key);
      return;
    }

    if (!Objects.equal(actualAsNavigableMap().lastKey(), key)) {
      if (actualAsNavigableMap().containsKey(key)) {
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s has last key <%s>. "
                        + "It does contain this key, but the last key is <%s>",
                    actualAsString(), key, actualAsNavigableMap().lastKey())));
        return;
      }
      failWithoutActual(
          simpleFact(
              lenientFormat(
                  "Not true that %s has last key <%s>. "
                      + "It does not contain this key, and the last key is <%s>",
                  actualAsString(), key, actualAsNavigableMap().lastKey())));
    }
  }
574254
@SuppressWarnings("unchecked")
    public boolean containsKey(Object key) {
        synchronized( this ) {
            //WeakReference ref;
            SoftReference ref;
            V item;
            
            if( !cache.containsKey(key) ) {
                return false;
            }
            ref = cache.get(key);
            item = (V)ref.get();
            if( item == null ) {
                return false;
            }
            if( item instanceof CachedItem ) {
                CachedItem ci = (CachedItem)item;
                
                if( !ci.isValidForCache() ) {
                    remove(key);
                    return false;
                }
            }
            return true;
        }
    }
1190953
public boolean containsKey(Object key)
    {
        if (key==null)
            return _nullEntry!=null;
        return
            getEntry(key.toString(),0,key==null?0:key.toString().length())!=null;
    }
1020737
public static boolean determineObject(String key) {
        if (!exists()) {
            throwThreadCacheNotInitializedException(key);
        }
        final Object obj = threadLocal.get().get(key);
        return obj != null && (boolean) obj;
    }
583490
@VisibleForTesting
  public boolean containsKey(K key) {
    Preconditions.checkNotNull(key, "key can not be null");
    return mCache.containsKey(key);
  }
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;
      }
    }
  }
347969
public boolean remove(String key) {

	if (pageSources.remove(key.toLowerCase()) != null) return true;

	Set<String> set = pageSources.keySet();
	String[] keys = set.toArray(new String[set.size()]); // done this way to avoid ConcurrentModificationException
	PageSource ps;
	for (String k: keys) {
	    ps = pageSources.get(k);
	    if (key.equalsIgnoreCase(ps.getClassName())) {
		pageSources.remove(k);
		return true;
	    }
	}
	return false;
    }
322528
function(key) {
            var s = Storage.storage();
            if (s == null) {
                return false;
            }
            return _.isUndefined(s[key]) == false;
        }
845012
@SuppressWarnings("PMD.AvoidDeeplyNestedIfStmts")
  private @Nullable V getOrLoad(K key) {
    boolean statsEnabled = statistics.isEnabled();
    long start = statsEnabled ? ticker.read() : 0L;

    long millis = 0L;
    Expirable<V> expirable = cache.getIfPresent(key);
    if ((expirable != null) && !expirable.isEternal()) {
      millis = nanosToMillis((start == 0L) ? ticker.read() : start);
      if (expirable.hasExpired(millis)) {
        Expirable<V> expired = expirable;
        cache.asMap().computeIfPresent(key, (k, e) -> {
          if (e == expired) {
            dispatcher.publishExpired(this, key, expired.get());
            statistics.recordEvictions(1);
            return null;
          }
          return e;
        });
        expirable = null;
      }
    }

    if (expirable == null) {
      expirable = cache.get(key);
      statistics.recordMisses(1L);
    } else {
      statistics.recordHits(1L);
    }

    V value = null;
    if (expirable != null) {
      setAccessExpirationTime(expirable, millis);
      value = copyValue(expirable);
    }
    if (statsEnabled) {
      statistics.recordGetTime(ticker.read() - start);
    }
    return value;
  }
1320224
public boolean getRequiredBoolean(String key) {
        Boolean value = configuration.getBoolean(key, null);
        if (value != null) {
            return value;
        } else {
            throw new IllegalStateException(String.format("required key [%s] not found", key));
        }
    }
395035
@Override
	public boolean containsKey(K key) {
		readLock.lock();

		try {
			// 不存在或已移除
			final CacheObj<K, V> co = cacheMap.get(key);
			if (co == null) {
				return false;
			}

			if (false == co.isExpired()) {
				// 命中
				return true;
			}
		} finally {
			readLock.unlock();
		}

		// 过期
		remove(key, true);
		return false;
	}
1104109
def key?(key)
      # First, check if item is already cached in memory
      return true if @cache.key?(key)
      # Otherwise, it might be cached on disk
      # but we should not consider the disk cache if it is disabled
      return false unless disk_cache_enabled?

      path = path_to(hash(key))
      File.file?(path) && File.readable?(path)
    end
1083180
@Override
    public boolean containsKey(Object key) {
        if (fast) {
            return (map.containsKey(key));
        } else {
            synchronized (map) {
                return (map.containsKey(key));
            }
        }
    }
1187196
public boolean has(String key){
		LazyNode child=root.child;
		while(child!=null){
			if(keyMatch(key,child)){
				return true;
			}
			child=child.next;
		}
		return false;
	}