if (key instanceof LongValue) { long index = key.toLong();  if (_index <= index) _index = index + 1; }
  private Entry createEntry(Value key)  {    if (_isDirty)      copyOnWrite();        int capacity = _entries.length;    key = key.toKey();        // XXX: check for long only (?) for perf    if (key instanceof LongValue) {      long index = key.toLong();      if (_index <= index)	_index = index + 1;    }    int hashMask = _hashMask;    int hash = key.hashCode() & hashMask;    int count = capacity;    for (; count >= 0; count--) {      Entry entry = _entries[hash];      if (entry == null)	break;      else if (key.equals(entry._key))	return entry;      hash = (hash + 1) & hashMask;    }        _size++;    Entry newEntry = new Entry(key);    _entries[hash] = newEntry;    newEntry._index = hash;    if (_head == null) {      newEntry._prev = null;      newEntry._next = null;            _head = newEntry;      _tail = newEntry;      _current = newEntry;    }    else {      newEntry._prev = _tail;      newEntry._next = null;            _tail._next = newEntry;      _tail = newEntry;    }    if (_entries.length <= 2 * _size)      expand();    return newEntry;  }