MCPcopy Create free account
hub / github.com/Berkeley-CS61B/skeleton-sp23 / get

Method get

lab08/src/hashmap/ULLMap.java:16–25  ·  view source on GitHub ↗

Returns the value corresponding to KEY or null if no such value exists.

(K key)

Source from the content-addressed store, hash-verified

14
15 /** Returns the value corresponding to KEY or null if no such value exists. */
16 public V get(K key) {
17 if (list == null) {
18 return null;
19 }
20 Node lookup = list.get(key);
21 if (lookup == null) {
22 return null;
23 }
24 return lookup.val;
25 }
26
27 @Override
28 public int size() {

Callers

nothing calls this directly

Calls 1

getMethod · 0.65

Tested by

no test coverage detected