@SuppressWarnings("ForLoopReplaceableByForEach") boolean containsValue(Object val){
  if (cnt != 0) {
    HashEntry<K,V>[] tab=tbl;
    int len=tab.length;
    for (int i=0; i < len; i++) {
      for (HashEntry<K,V> e=tab[i]; e != null; e=e.next) {
        V v=e.val;
        if (v == null)         v=readValueUnderLock(e);
        if (val.equals(v))         return true;
      }
    }
  }
  return false;
}

@ SuppressWarnings ( "ForLoopReplaceableByForEach" ) boolean containsValue ( Object val ) { if ( cnt != 0 ) { HashEntry < K , V > [ ] tab = tbl ; int len = tab . length ; for ( int i = 0 ; i < len ; i ++ ) { for ( HashEntry < K , V > e = tab [ i ] ; e != null ; e = e . next ) { V v = e . val ; if ( v == null ) v = readValueUnderLock ( e ) ; if ( val . equals ( v ) ) return true ; } } } return false ; }
performs lock - free check of value presence .
