MCPcopy Create free account
hub / github.com/GateNLP/gate-core / getEntry

Method getEntry

src/main/java/gate/util/RBTreeMap.java:341–353  ·  view source on GitHub ↗

Returns this map's entry for the given key, or null if the map does not contain an entry for the key. @return this map's entry for the given key, or null if the map does not contain an entry for the key. @throws ClassCastException if the key cannot be compared with the key

(Object key)

Source from the content-addressed store, hash-verified

339 * <tt>null</tt> keys.
340 */
341 private Entry<K,V> getEntry(Object key) {
342 Entry<K,V> p = root;
343 while (p != null) {
344 int cmp = compare(key,p.key);
345 if (cmp == 0)
346 return p;
347 else if (cmp < 0)
348 p = p.left;
349 else
350 p = p.right;
351 }
352 return null;
353 }
354
355
356 /**

Callers 6

containsKeyMethod · 0.95
getMethod · 0.95
removeMethod · 0.95
containsMethod · 0.95
containsMethod · 0.80
removeMethod · 0.80

Calls 1

compareMethod · 0.95

Tested by

no test coverage detected