@Override public boolean containsValue(Object value) { return containsValue(((Integer) value).intValue()); }
int valueIndex(int value) { if (isEmpty()) return -1; int index = -1; int mc = modCount(); short free = freeValue; short[] keys = set; int[] 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(int value) { return valueIndex(value) >= 0; }
int insert(short key, int value) { short free; if (key == (free = freeValue)) { free = changeFree(); incrementModCount(); keys[index] = key; values[index] = value; postInsertHook(); return -1;
@Override final void move(SeparateKVShortIntLHash hash) { int myMC = modCount(), hashMC = hash.modCount(); super.move(hash); if (myMC != modCount() || hashMC != hash.modCount()) throw new ConcurrentModificationException(); }
@Override final void copy(SeparateKVShortIntLHash hash) { int myMC = modCount(), hashMC = hash.modCount(); super.copy(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(short key, int value) { short free; if (key == (free = freeValue)) { free = changeFree(); incrementModCount(); keys[index] = key; values[index] = value; postInsertHook(); return -1;
@Override final void move(SeparateKVShortIntLHash hash) { int myMC = modCount(), hashMC = hash.modCount(); super.move(hash); if (myMC != modCount() || hashMC != hash.modCount()) throw new ConcurrentModificationException(); }
@Override final void copy(SeparateKVShortIntLHash hash) { int myMC = modCount(), hashMC = hash.modCount(); super.copy(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(int value) { if (isEmpty()) return -1; int index = -1; int mc = modCount(); short free = freeValue; short[] keys = set; int[] 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(int value) { return valueIndex(value) >= 0; }
@Override public boolean containsValue(Object value) { return containsValue(((Integer) value).intValue()); }