private final Entry getEntry(String key, int hash) { if (_readOnlyMap != null) { final Entry entry = _readOnlyMap.getEntry(key, hash); if (entry != null) { return entry; } } final int tableIndex = indexFor(hash, _table.length); for (Entry e = _table[tableIndex]; e != null; e = e._next) { if (e._hash == hash && eq(key, e._key)) { return e; } } return null; }
public final Entry obtainEntry(String key) { final int hash = hashHash(key.hashCode()); if (_readOnlyMap != null) { final Entry entry = _readOnlyMap.getEntry(key, hash); if (entry != null) { return entry; } } final int tableIndex = indexFor(hash, _table.length); for (Entry e = _table[tableIndex]; e != null; e = e._next) { if (e._hash == hash && eq(key, e._key)) { return e; } } return addEntry(key, hash, tableIndex); }