void move(SeparateKVLongQHash hash) { super.copy(hash); freeValue = hash.freeValue(); if (hash.supportRemoved()) removedValue = hash.removedValue(); set = hash.keys(); if (!hash.supportRemoved()) { removedValue = freeValue; removedValue = findNewFreeOrRemoved(); } }
@Override @Nonnull public UpdatableQHashLongSetGO newUpdatableSet(Iterable<Long> elements, int expectedSize) { if (elements instanceof LongCollection) { if (elements instanceof SeparateKVLongQHash) { SeparateKVLongQHash hash = (SeparateKVLongQHash) elements; if (hash.hashConfig().equals(hashConf)) { UpdatableQHashLongSet set = new UpdatableQHashLongSet(); set.copy(hash); return set; } } int size = elements instanceof Set ? ((Set) elements).size() : expectedSize; UpdatableQHashLongSetGO set = newUpdatableSet(size); set.addAll((Collection<Long>) elements); return set; } else { int size = elements instanceof Set ? ((Set) elements).size() : expectedSize; UpdatableQHashLongSetGO set = newUpdatableSet(size); for (long e : elements) { set.add(e); } return set; } } }
@Override @Nonnull public UpdatableQHashLongSetGO newUpdatableSet(Iterable<Long> elements, int expectedSize) { if (elements instanceof LongCollection) { if (elements instanceof SeparateKVLongQHash) { SeparateKVLongQHash hash = (SeparateKVLongQHash) elements; if (hash.hashConfig().equals(hashConf)) { UpdatableQHashLongSet set = new UpdatableQHashLongSet(); set.copy(hash); return set; } } int size = elements instanceof Set ? ((Set) elements).size() : expectedSize; UpdatableQHashLongSetGO set = newUpdatableSet(size); set.addAll((Collection<Long>) elements); return set; } else { int size = elements instanceof Set ? ((Set) elements).size() : expectedSize; UpdatableQHashLongSetGO set = newUpdatableSet(size); for (long e : elements) { set.add(e); } return set; } } }
void move(SeparateKVLongQHash hash) { super.copy(hash); freeValue = hash.freeValue(); if (hash.supportRemoved()) removedValue = hash.removedValue(); set = hash.keys(); if (!hash.supportRemoved()) { removedValue = freeValue; removedValue = findNewFreeOrRemoved(); } }
void copy(SeparateKVLongQHash hash) { super.copy(hash); freeValue = hash.freeValue(); if (hash.supportRemoved()) removedValue = hash.removedValue(); set = hash.keys().clone(); if (!hash.supportRemoved()) { removedValue = freeValue; removedValue = findNewFreeOrRemoved(); } }
void copy(SeparateKVLongQHash hash) { super.copy(hash); freeValue = hash.freeValue(); if (hash.supportRemoved()) removedValue = hash.removedValue(); set = hash.keys().clone(); if (!hash.supportRemoved()) { removedValue = freeValue; removedValue = findNewFreeOrRemoved(); } }