@Override public boolean containsValue(Object value) { return containsValue(((Short) value).shortValue()); }
int valueIndex(short value) { if (isEmpty()) return -1; int index = -1; int mc = modCount(); long free = freeValue; long[] keys = set; short[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { if (keys[i] != free) { if (value == vals[i]) { index = i; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return index; }
@Override public boolean containsValue(short value) { return valueIndex(value) >= 0; }
int insert(long key, short value) { long free; if (key == (free = freeValue)) { free = changeFree(); incrementModCount(); keys[index] = key; values[index] = value; postInsertHook(); return -1;
@Override final void copy(SeparateKVLongShortLHash hash) { int myMC = modCount(), hashMC = hash.modCount(); super.copy(hash); if (myMC != modCount() || hashMC != hash.modCount()) throw new ConcurrentModificationException(); }
@Override final void move(SeparateKVLongShortLHash hash) { int myMC = modCount(), hashMC = hash.modCount(); super.move(hash); if (myMC != modCount() || hashMC != hash.modCount()) throw new ConcurrentModificationException(); }
@Override public void clear() { int mc = modCount() + 1; super.clear(); if (mc != modCount()) throw new ConcurrentModificationException(); }
int insert(long key, short value) { long free; if (key == (free = freeValue)) { free = changeFree(); incrementModCount(); keys[index] = key; values[index] = value; postInsertHook(); return -1;
@Override final void copy(SeparateKVLongShortLHash hash) { int myMC = modCount(), hashMC = hash.modCount(); super.copy(hash); if (myMC != modCount() || hashMC != hash.modCount()) throw new ConcurrentModificationException(); }
@Override final void move(SeparateKVLongShortLHash hash) { int myMC = modCount(), hashMC = hash.modCount(); super.move(hash); if (myMC != modCount() || hashMC != hash.modCount()) throw new ConcurrentModificationException(); }
@Override public void clear() { int mc = modCount() + 1; super.clear(); if (mc != modCount()) throw new ConcurrentModificationException(); }
int valueIndex(short value) { if (isEmpty()) return -1; int index = -1; int mc = modCount(); long free = freeValue; long[] keys = set; short[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { if (keys[i] != free) { if (value == vals[i]) { index = i; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return index; }
@Override public boolean containsValue(Object value) { return containsValue(((Short) value).shortValue()); }
@Override public boolean containsValue(short value) { return valueIndex(value) >= 0; }