Return ceilingKey, floorKey, higherKey or lowerKey

@param key the key
@param upORdown true returns ceilingKey, false floorKey
@param acceptEqual true returns equal keys, otherwise, only higher or lower
@return the key found or null if not found
189452
private final K getRoundKey(final K key, final boolean upORdown, final boolean acceptEqual) {
		final TreeEntry<K, V> entry = getRoundEntry(key, upORdown, acceptEqual);
		if (entry == null) {
			return null;
		}
		return entry.getKey();
	}
26886
private void checkKey(final byte[] key) {
		if (theBinaryKey.get() != null) {
			verifyKey(key);
		} else {
			boolean success = theBinaryKey.compareAndSet(null, key);
			if (!success) {
				// someone already beat us to it. that's fine, just verify
				// that the key is the same
				verifyKey(key);
			} else {
				pipelined(key);
			}
		}
	}
598793
public synchronized TreeEntry<K, V> higherEntry(final K key) {
		// Retorna la clave mas cercana mayor a la clave indicada
		return getRoundEntry(key, true, false);
	}
1161095
private int findEqual(
    SearchComparator  comp,
    int               lower,
    int               upper,
    Object            searchKey)
  {
    int nkeys = numKeys(lower, upper);
    int idx = -1;
    if (nkeys < 4)
      idx = sequentialSearchEqual(comp, lower, upper, searchKey);
    else
      idx = binarySearchEqual(comp, lower, upper, searchKey);
    return idx;
  }
230691
public final boolean getFinalUnificationValue(Map<String, List<String>> uFeatures) {
    int tokUnified = 0;
    for (int j = 0; j < tokSequence.size(); j++) {
      boolean unifiedTokensFound = false; // assume that nothing has been found
      for (int i = 0; i < tokSequenceEquivalences.get(j).size(); i++) {
        int featUnified = 0;
        if (tokSequenceEquivalences.get(j).get(i).containsKey(UNIFY_IGNORE)) {
          if (i == 0) {
            tokUnified++;
          }
          unifiedTokensFound = true;
          continue;
        } else {
          for (Map.Entry<String, List<String>> feat : uFeatures.entrySet()) {
            if (tokSequenceEquivalences.get(j).get(i).containsKey(feat.getKey()) &&
                tokSequenceEquivalences.get(j).get(i).get(feat.getKey()).isEmpty()) {
              featUnified = 0;
            } else {
              featUnified++;
            }
            if (featUnified == unificationFeats.entrySet().size() && tokUnified <= j) {
              tokUnified++;
              unifiedTokensFound = true;
              break;
            }
          }
        }

      }
      if (!unifiedTokensFound) {
        return false;
      }
    }
    if (tokUnified == tokSequence.size()) {
      return true;
    }
    return false;
  }
138571
public boolean getBoolean(String key) {
		addToDefaults(key, null);
		String value = getRequired(key);
		return Boolean.valueOf(value);
	}
216055
@Override
    public K floorKey(K key)
    {
        Entry<K, V> entry = entry(key, null);
        Entry<K, V> floor = entrySet.floor(entry);
        if (floor != null)
        {
            return floor.getKey();
        }
        return null;
    }
723312
private void checkRSACompatible() {
        if (!JsonWebKeyType.RSA.equals(kty) && !JsonWebKeyType.RSA_HSM.equals(kty)) {
            throw new UnsupportedOperationException("Not an RSA key");
        }
    }
1056776
public boolean containsKey(final Object key)
    {
        @DoNotSub final int mask = values.length - 1;
        @DoNotSub int index = Hashing.hash(key, mask);

        boolean found = false;
        while (missingValue != values[index])
        {
            if (key.equals(keys[index]))
            {
                found = true;
                break;
            }

            index = ++index & mask;
        }

        return found;
    }
364073
function getUpperBoundMatcher(compare, query) {
		// No lower bound
		if (!query.hasOwnProperty('$lt') && !query.hasOwnProperty('$lte')) {
			return function () { return true; };
		}
		if (query.hasOwnProperty('$lt') && query.hasOwnProperty('$lte')) {
			if (compare(query.$lte, query.$lt) === 0) {
				return function (key) { return compare(key, query.$lt) < 0; };
			}
			if (compare(query.$lte, query.$lt) < 0) {
				return function (key) { return compare(key, query.$lte) <= 0; };
			} else {
				return function (key) { return compare(key, query.$lt) < 0; };
			}
		}
		if (query.hasOwnProperty('$lt')) {
			return function (key) { return compare(key, query.$lt) < 0; };
		} else {
			return function (key) { return compare(key, query.$lte) <= 0; };
		}
	}
207196
public static <K, V extends Comparable<V>> Ordering<Map.Entry<K, V>> byValueOrderingDescending() {
    return Ordering.<V>natural().onResultOf(MapUtils.<K, V>getEntryValue()).reverse();
  }
1039403
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return HI_Algorithm(key)
        if key not in HI_Algorithm._member_map_:
            extend_enum(HI_Algorithm, key, default)
        return HI_Algorithm[key]
1118378
public java.lang.String getRetOrDefault(
      java.lang.String key,
      java.lang.String defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetRet().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
759068
final TreeMapEntry<K,V> getEntryUsingComparator(Object key) {
        @SuppressWarnings("unchecked")
            K k = (K) key;
        Comparator<? super K> cpr = comparator;
        if (cpr != null) {
            TreeMapEntry<K,V> p = root;
            while (p != null) {
                int cmp = cpr.compare(k, p.key);
                if (cmp < 0)
                    p = p.left;
                else if (cmp > 0)
                    p = p.right;
                else
                    return p;
            }
        }
        return null;
    }
334483
public Node<T> searchNearestHigher(long value, boolean acceptEquals) {
    	if (root == null) return null;
    	return searchNearestHigher(root, value, acceptEquals);
    }
107917
public AVIMConversationsQuery whereEqualTo(String key, Object value) {
    conditions.whereEqualTo(key, value);
    return this;
  }
834020
public boolean isBaseLevelForKey(Slice userKey)
    {
        // Maybe use binary search to find right entry instead of linear search?
        UserComparator userComparator = inputVersion.getInternalKeyComparator().getUserComparator();
        for (int level = this.level + 2; level < NUM_LEVELS; level++) {
            List<FileMetaData> files = inputVersion.getFiles(level);
            while (levelPointers[level] < files.size()) {
                FileMetaData f = files.get(levelPointers[level]);
                if (userComparator.compare(userKey, f.getLargest().getUserKey()) <= 0) {
                    // We've advanced far enough
                    if (userComparator.compare(userKey, f.getSmallest().getUserKey()) >= 0) {
                        // Key falls in this file's range, so definitely not base level
                        return false;
                    }
                    break;
                }
                levelPointers[level]++;
            }
        }
        return true;
    }