Returns the value corresponding to KEY or null if no such value exists.
(K key)
| 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() { |