@Override public boolean containsValue(Object value) { return containsValue(((Double) value).doubleValue()); }
int valueIndex(long value) { if (isEmpty()) return -1; int index = -1; int mc = modCount(); byte free = freeValue; byte[] keys = set; long[] 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(double value) { return valueIndex(value) >= 0; }
int insert(byte key, long value) { byte free; if (key == (free = freeValue)) { free = changeFree(); incrementModCount(); keys[index] = key; values[index] = value; postInsertHook(); return -1;
@Override final void move(SeparateKVByteDoubleQHash 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(); }
@Override final void copy(SeparateKVByteDoubleQHash hash) { int myMC = modCount(), hashMC = hash.modCount(); super.copy(hash); if (myMC != modCount() || hashMC != hash.modCount()) throw new ConcurrentModificationException(); }
int insert(byte key, long value) { byte free; if (key == (free = freeValue)) { free = changeFree(); incrementModCount(); keys[index] = key; values[index] = value; postInsertHook(); return -1;
@Override final void move(SeparateKVByteDoubleQHash 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(); }
@Override final void copy(SeparateKVByteDoubleQHash hash) { int myMC = modCount(), hashMC = hash.modCount(); super.copy(hash); if (myMC != modCount() || hashMC != hash.modCount()) throw new ConcurrentModificationException(); }
int valueIndex(long value) { if (isEmpty()) return -1; int index = -1; int mc = modCount(); byte free = freeValue; byte[] keys = set; long[] 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(double value) { return valueIndex(value) >= 0; }
@Override public boolean containsValue(Object value) { return containsValue(((Double) value).doubleValue()); }
int valueIndex(double value) { if (isEmpty()) return -1; long val = Double.doubleToLongBits(value); int index = -1; int mc = modCount(); byte free = freeValue; byte[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { if (keys[i] != free) { if (val == vals[i]) { index = i; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return index; }
boolean containsValue(long value) { return valueIndex(value) >= 0; }
int valueIndex(double value) { if (isEmpty()) return -1; long val = Double.doubleToLongBits(value); int index = -1; int mc = modCount(); byte free = freeValue; byte[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { if (keys[i] != free) { if (val == vals[i]) { index = i; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return index; }
boolean containsValue(long value) { return valueIndex(value) >= 0; }