Implement LinkedHashMap

This implementation is intentionally simple. If and when the need arises,
we can always implement a more performant version.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2013-10-31 01:42:09 -05:00
parent c023bd8654
commit 58ea1442fd
2 changed files with 268 additions and 1 deletions

View File

@ -93,7 +93,7 @@ public class HashMap<K, V> implements Map<K, V> {
array = newArray;
}
private Cell<K, V> find(Object key) {
protected Cell<K, V> find(Object key) {
if (array != null) {
int index = helper.hash(key) & (array.length - 1);
for (Cell<K, V> c = array[index]; c != null; c = c.next()) {