The method tests, if the cache has stored some entries.

@return <i>true</i> if the cache has some entries, otherwise
<i>false</i>
550239
public boolean hasEntries()
    {
        return (getCache4Id() != null && !getCache4Id().isEmpty())
            || (getCache4Name() != null && !getCache4Name().isEmpty())
            || (getCache4UUID() != null && !getCache4UUID().isEmpty());
    }
1367666
public boolean has() {
        return attributeHolder.getAttribute(getMessagesKey(), UserMessages.class).filter(messages -> {
            return !messages.isEmpty();
        }).isPresent();
    }
1152924
@Contract(pure = true)
	public boolean hasRemainingBytes(int remaining) {
		assert remaining >= 0;
		if (remaining == 0) return true;
		for (int i = first; i != last; i = next(i)) {
			int bufRemaining = bufs[i].readRemaining();
			if (bufRemaining >= remaining)
				return true;
			remaining -= bufRemaining;
		}
		return false;
	}
561157
private boolean isExpired(CacheEntry entry) {
        if (ttl == 0) {
            return false;
        }

        return entry.getTimestamp() + ttl < System.currentTimeMillis();
    }
1046622
private function isCacheUpToDate()
    {
        if (!file_exists($this->cachedFile)) {
            return false;
        }

        $cacheTime  = filemtime($this->cachedFile);
        $configTime = max(filemtime($this->configPath), filemtime($this->envFile));

        return $cacheTime == $configTime;
    }
951498
public boolean isEmpty() throws Exception {
		return Iterables.isEmpty(eventsBufferCache.keySet()) && Iterables.isEmpty(eventsBuffer.keys());
	}
592890
private function isPerfectCache()
	{
		if ($this->cacheMap[$this->hash] + 0x93a80 > time()) {
			$this->cacheData = json_decode(
				file_get_contents(
					$this->cacheFile
				), 
				true
			);
			return is_array($this->cacheData);
		}
		return false;
	}
1176669
@Override
    public boolean hasNext() {
        if (!members.hasNext()) {
            try {
                getNextEntries();
            } catch (final Exception ignored) {
                LOG.error("An error occured while getting next entries", ignored);
            }
        }
        return members.hasNext();
    }
1163646
def is_cached(self):
        """"""
        # TODO: cache by target+hash, not per file.
        try:
            for item in self.rule.output_files:
                log.info(item)
                self.cachemgr.in_cache(item, self._metahash())
        except cache.CacheMiss:
            log.info('[%s]: Not cached.', self.address)
            return False
        else:
            log.info('[%s]: found in cache.', self.address)
            return True
768963
public function cacheExists()
    {
        $cacheFile = $this->getCacheFile();
        if (file_exists($cacheFile) && filemtime($cacheFile) > (time()-$this->cachePeriod)) {
            return(true);
        } else {
            return(false);
        }
    }
1010409
public boolean hasNext() {
		if(done) return false;
		if(cachedNext != null) {
			return true;
		}
		while(inner.hasNext()) {
			String tmp = inner.next();
			if(tmp.startsWith(prefix)) {
				cachedNext = tmp;
				return true;
			} else if(tmp.compareTo(prefix) > 0) {
				done = true;
				return false;
			}
		}
		return false;
	}
1340345
public boolean hasPrevious() {
        // If we are at the start of the list there are no previous elements.
        if (currentIndex == startIndex) {
            return false;
        }
        // Otherwise, see if previous Element is null. If so, try to load the
        // previous element to make sure it exists.
        if (previousElement == null) {
            previousElement = getPreviousElement();
            // If getting the previous element failed, return false.
            if (previousElement == null) {
                return false;
            }
        }
        return true;
    }
213784
protected boolean isLeaf() {

        for (int i = 0; i < entries.length; i++) {
            Entry entry = entries[i];
            if (entry.getChild() != null) {
                return false;
            }
        }

        return true;
    }
525933
public boolean isCacheValue(Object objKey)
    {
        if (m_hmCache == null)
            return false;
        if (objKey == null)
            return false;
        Class<?> classKey = this.getField().getDataClass();
        objKey = this.convertKey(objKey, classKey);
        return m_hmCache.containsKey(objKey);
    }
1035790
public boolean containsKey(Object key) {
        if( !cache.containsKey(key) ) {
            return false;
        }
        else {
            SoftReference<T> ref = cache.get(key);
            T ob = ref.get();
            
            if( ob == null ) {
                release(key);
                return false;
            }
            if( ob instanceof CachedItem ) {
                if( !((CachedItem)ob).isValidForCache() ) {
                    release(key);
                    return false;
                }
            }
            return true;
        }
    }
474017
public boolean hasHandled() {
    for(int i = 0; i < getNumEntries(); i++) {
      boolean handled = getEntry(i).hasHandled();
      if(handled) {
        return true;
      }
    }
    return false;
  }
334812
private function _isCached() 
    {
        $filters = false;

        if ($this->cacheSettings) {
        
            if ($this->cache) {
                $filters = $this->cache->getCache();
            }
        }

        return $filters;
    }