Returns the set of keys in this whose total count is strictly
greater than {@code threshold}.

@param threshold
@return
512211
public Set<T> getKeysAboveCountThreshold(double threshold) {
    Set<T> keys = Sets.newHashSet();
    for (T key : counts.keySet()) {
      if (counts.get(key) > threshold) {
        keys.add(key);
      }
    }
    return keys;
  }
684427
public function setThreshold($threshold)
    {

        // need to return << true
        if (is_array($threshold) === true) {
            $threshold = array_map('intval', array_splice($threshold, 0, 2));
        }

        else {
            $threshold = intval($threshold);
        }
        $this->validator->verify($threshold, [], 'threshold');

        return $this;
    }
1115752
public static CounterMap parseCounters(byte[] prefix,
      Map<byte[], byte[]> keyValues) {
    CounterMap counterValues = new CounterMap();
    byte[] counterPrefix = Bytes.add(prefix, Constants.SEP_BYTES);
    for (Map.Entry<byte[], byte[]> entry : keyValues.entrySet()) {
      byte[] key = entry.getKey();
      if (Bytes.startsWith(key, counterPrefix)
          && key.length > counterPrefix.length) {
        // qualifier should be in the format: g!countergroup!counterkey
        byte[][] qualifierFields =
            ByteUtil.split(Bytes.tail(key, key.length - counterPrefix.length),
                Constants.SEP_BYTES);
        if (qualifierFields.length != 2) {
          throw new IllegalArgumentException(
              "Malformed column qualifier for counter value: "
                  + Bytes.toStringBinary(key));
        }
        Counter c = new Counter(Bytes.toString(qualifierFields[0]),
            Bytes.toString(qualifierFields[1]), Bytes.toLong(entry.getValue()));
        counterValues.add(c);
      }
    }

    return counterValues;
  }
609703
public static <E> Counter<E> division(Counter<E> c1, Counter<E> c2) {
    Counter<E> result = c1.getFactory().create();
    for (E key : Sets.union(c1.keySet(), c2.keySet())) {
      result.setCount(key, c1.getCount(key) / c2.getCount(key));
    }
    return result;
  }
546962
private int collectCandidates(Map<Long, Score> candidates,
                                List<Bucket> buckets,
                                int threshold) {
    int ix;
    for (ix = 0; ix < threshold &&
           candidates.size() < (CUTOFF_FACTOR_1 * max_search_hits); ix++) {
      Bucket b = buckets.get(ix);
      long[] ids = b.records;
      double score = b.getScore();
      
      for (int ix2 = 0; ix2 < b.nextfree; ix2++) {
        Score s = candidates.get(ids[ix2]);
        if (s == null) {
          s = new Score(ids[ix2]);
          candidates.put(ids[ix2], s);
        }
        s.score += score;
      }
      if (DEBUG)
        System.out.println("Bucket " + b.nextfree + " -> " + candidates.size());
    }
    return ix;
  }
815703
public final Set<FilterEntry<T>> getFilterExpectEntrys() {
        HashSet<FilterEntry<T>> set = new HashSet<>();
        set.addAll(expectEntrys);
        if (ors != null) ors.forEach(f -> set.addAll(f.getFilterExpectEntrys()));
        if (ands != null) ands.forEach(f -> set.addAll(f.getFilterExpectEntrys()));
        return set;
    }
918420
public void setThreshold(double threshold)
    {
        if(Double.isNaN(threshold) || threshold <= 0)
            throw new IllegalArgumentException("Threshold must be positive, not " + threshold);
        this.threshold = threshold;
    }
501211
public Object[] getSuperSetWithClassifier(C key) {
        if (key == null) {
            return getAllElements();
        } else {
            int index = (key.hashCode() & 0x7FFFFFFF) % elements.length;
    
            return CompactSet.getElements(elements[index]);
        }
    }
1114736
@Override
    public Filter<E> build(Level threshold) {
        return new Filter<E>() {
            @Override
            public FilterReply decide(E event) {
                return FilterReply.NEUTRAL;
            }
        };
    }
275075
public List<K> getKeys() {
        synchronized ( _map ) {
            return new java.util.ArrayList<K>( _map.keySet() );
        }
    }
1184165
public RequestLimitRule matchingKeys(String... keys) {
        Set<String> keySet = keys.length > 0 ? new HashSet<>(Arrays.asList(keys)) : null;
        return matchingKeys(keySet);
    }
928670
def getlevel(self, threshold):
        

        # if it's not worth clustering, just return the data
        if len(self._input) <= 1:
            return self._input

        # initialize the cluster if not yet done
        if not self.__cluster_created:
            self.cluster()

        return self._data[0].getlevel(threshold)
402453
public boolean containsKey(int key) {
        Entry tab[] = table;

        int index = (key & 0x7FFFFFFF) % tab.length;
        for (Entry e = tab[index]; e != null; e = e.next) {
            if (e.key == key) {
                return true;
            }
        }
        
        return false;
    }
539826
public boolean containsKey(List<K> key) {
    //     if(! (key instanceof Object[]))
    //       return false;
    //    Object[] o = (Object[]) key;
    GeneralizedCounter<K> next = this;
    for (int i=0; i<key.size()-1; i++) {
      next = next.conditionalizeHelper(key.get(i));
      if (next==null) return false;
    }
    return next.map.containsKey(key.get(key.size()-1));
  }
492699
public BigInteger getTotalCounts(){
		BigInteger result = BigInteger.ZERO;
		for (AtomicLong c: counters.getMap().values()){
			result = result.add(BigInteger.valueOf(c.get()));
		}
		return result;
	}
557947
public <K, V> Set<Map.Entry<K, V>> entrySet(Map<K, V> map) {
        return map.entrySet();
    }
93359
public List<Match> matches(List<String> desired, int threshold) {
    return matchesImpl(parse(desired), threshold);
  }