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

Method get

lab07/src/ULLMap.java:84–92  ·  view source on GitHub ↗

Returns the Entry in this linked list of key-value pairs whose key is equal to KEY, or null if no such Entry exists.

(K k)

Source from the content-addressed store, hash-verified

82 /** Returns the Entry in this linked list of key-value pairs whose key
83 * is equal to KEY, or null if no such Entry exists. */
84 Entry get(K k) {
85 if (k != null && k.equals(key)) {
86 return this;
87 }
88 if (next == null) {
89 return null;
90 }
91 return next.get(key);
92 }
93
94 /** Stores the key of the key-value pair of this node in the list. */
95 K key;

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected