code: @Override
      public boolean containsValue(Object value) {
          // Same idea as size()
          if (value == null) {
            throw new NullPointerException();
          }
          final Segment<K,V>[] segments = this.segments;
          boolean found = false;
          long last = 0;
          int retries = -1;
          try {
              outer: for (;;) {
                  if (retries++ == RETRIES_BEFORE_LOCK) {
                      for (int j = 0; j < segments.length; ++j)
                       {
                        ensureSegment(j).lock(); // force creation
                      }
                  }
                  long hashSum = 0L;
                  int sum = 0;
                  for (int j = 0; j < segments.length; ++j) {
                      HashEntry<K,V>[] tab;
                      Segment<K,V> seg = segmentAt(segments, j);
                      if (seg != null && (tab = seg.table) != null) {
                          for (int i = 0 ; i < tab.length; i++) {
                              HashEntry<K,V> e;
                              for (e = entryAt(tab, i); e != null; e = e.next) {
                                  V v = e.value;
                                  if (v != null && value.equals(v)) {
                                      found = true;
                                      break outer;
                                  }
                              }
                          }
                          sum += seg.modCount;
                      }
                  }
                  if (retries > 0 && sum == last) {
                    break;
                  }
                  last = sum;
              }
          } finally {
              if (retries > RETRIES_BEFORE_LOCK) {
                  for (int j = 0; j < segments.length; ++j) {
                    segmentAt(segments, j).unlock();
                  }
              }
          }
          return found;
      }
docs: Returns <tt>true</tt> if this map maps one or more keys to the
  specified value. Note: This method requires a full internal
  traversal of the hash table, and so is much slower than
  method <tt>containsKey</tt>.
  
  @param value value whose presence in this map is to be tested
  @return <tt>true</tt> if this map maps one or more keys to the
  specified value
  @throws NullPointerException if the specified value is null