public boolean containsValue()

in core/src/main/java/gnu/trove/THashMap.java [446:469]


  public boolean containsValue(Object val) {
    Object[] set = _set;
    V[] vals = _values;

    // special case null values so that we don't have to
    // perform null checks before every call to equals()
    if (null == val) {
      for (int i = vals.length; i-- > 0; ) {
        if (set[i] != null && set[i] != REMOVED &&
            val == vals[i]) {
          return true;
        }
      }
    }
    else {
      for (int i = vals.length; i-- > 0; ) {
        if (set[i] != null && set[i] != REMOVED &&
            (val == vals[i] || val.equals(vals[i]))) {
          return true;
        }
      }
    } // end of else
    return false;
  }