code: 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;
          }
      }
docs: Checks if an object with the specified key is in the cache.
  @param key the object's identifier
  @return true if the object is in the cache