public boolean contains(Object key) { return contains(((Short) key).shortValue()); }
short changeRemoved() { int mc = modCount(); short newRemoved = findNewFreeOrRemoved(); incrementModCount(); mc++; if (!noRemoved()) { ShortArrays.replaceAll(set, removedValue, newRemoved); } this.removedValue = newRemoved; if (mc != modCount()) throw new ConcurrentModificationException(); return newRemoved; }
public boolean contains(short key) { return index(key) >= 0; }
short changeFree() { int mc = modCount(); short newFree = findNewFreeOrRemoved(); incrementModCount(); mc++; ShortArrays.replaceAll(set, freeValue, newFree); this.freeValue = newFree; if (mc != modCount()) throw new ConcurrentModificationException(); return newFree; }
private short findNewFreeOrRemoved() { int mc = modCount(); int size = size(); if (size >= SHORT_CARDINALITY - if (newFree != free && newFree != removed && index(newFree) < 0) { break searchForFree; if (mc != modCount()) throw new ConcurrentModificationException(); throw new AssertionError("Impossible state"); index(newFree) >= 0);
void move(SeparateKVShortQHash hash) { super.copy(hash); freeValue = hash.freeValue(); if (hash.supportRemoved()) removedValue = hash.removedValue(); set = hash.keys(); if (!hash.supportRemoved()) { removedValue = freeValue; removedValue = findNewFreeOrRemoved(); } }
short changeFree() { int mc = modCount(); short newFree = findNewFreeOrRemoved(); incrementModCount(); mc++; ShortArrays.replaceAll(set, freeValue, newFree); this.freeValue = newFree; if (mc != modCount()) throw new ConcurrentModificationException(); return newFree; }
private short findNewFreeOrRemoved() { int mc = modCount(); int size = size(); if (size >= SHORT_CARDINALITY - if (newFree != free && newFree != removed && index(newFree) < 0) { break searchForFree; if (mc != modCount()) throw new ConcurrentModificationException(); throw new AssertionError("Impossible state"); index(newFree) >= 0);
void move(SeparateKVShortQHash hash) { super.copy(hash); freeValue = hash.freeValue(); if (hash.supportRemoved()) removedValue = hash.removedValue(); set = hash.keys(); if (!hash.supportRemoved()) { removedValue = freeValue; removedValue = findNewFreeOrRemoved(); } }
short changeRemoved() { int mc = modCount(); short newRemoved = findNewFreeOrRemoved(); incrementModCount(); mc++; if (!noRemoved()) { ShortArrays.replaceAll(set, removedValue, newRemoved); } this.removedValue = newRemoved; if (mc != modCount()) throw new ConcurrentModificationException(); return newRemoved; }
void copy(SeparateKVShortQHash hash) { super.copy(hash); freeValue = hash.freeValue(); if (hash.supportRemoved()) removedValue = hash.removedValue(); set = hash.keys().clone(); if (!hash.supportRemoved()) { removedValue = freeValue; removedValue = findNewFreeOrRemoved(); } }
public boolean contains(Object key) { return contains(((Short) key).shortValue()); }
public boolean contains(short key) { return index(key) >= 0; }
void copy(SeparateKVShortQHash hash) { super.copy(hash); freeValue = hash.freeValue(); if (hash.supportRemoved()) removedValue = hash.removedValue(); set = hash.keys().clone(); if (!hash.supportRemoved()) { removedValue = freeValue; removedValue = findNewFreeOrRemoved(); } }