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