code: public boolean containsValue(Object val) {
          synchronized( this ) {
              for( V item : values() ) {
                  if( item instanceof CachedItem ){
                      CachedItem ci = (CachedItem)item;
  
                      if( ci.isValidForCache() && ci.equals(val) ) {
                          return true;
                      }
                  }
                  else if( item.equals(val) ) {
                      return true;
                  }
              }
          }
          return false;
      }
docs: Verifies that the specified value is in the cache.
  @param val the desired value
  @return true if it is in the cache and value