void move(SeparateKVByteQHash 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 UpdatableQHashByteSetGO newUpdatableSet(Iterable<Byte> elements, int expectedSize) { if (elements instanceof ByteCollection) { if (elements instanceof SeparateKVByteQHash) { SeparateKVByteQHash hash = (SeparateKVByteQHash) elements; if (hash.hashConfig().equals(hashConf)) { UpdatableQHashByteSet set = new UpdatableQHashByteSet(); set.copy(hash); return set; } } int size = elements instanceof Set ? ((Set) elements).size() : expectedSize; UpdatableQHashByteSetGO set = newUpdatableSet(size); set.addAll((Collection<Byte>) elements); return set; } else { int size = elements instanceof Set ? ((Set) elements).size() : expectedSize; UpdatableQHashByteSetGO set = newUpdatableSet(size); for (byte e : elements) { set.add(e); } return set; } } }
@Override @Nonnull public UpdatableQHashByteSetGO newUpdatableSet(Iterable<Byte> elements, int expectedSize) { if (elements instanceof ByteCollection) { if (elements instanceof SeparateKVByteQHash) { SeparateKVByteQHash hash = (SeparateKVByteQHash) elements; if (hash.hashConfig().equals(hashConf)) { UpdatableQHashByteSet set = new UpdatableQHashByteSet(); set.copy(hash); return set; } } int size = elements instanceof Set ? ((Set) elements).size() : expectedSize; UpdatableQHashByteSetGO set = newUpdatableSet(size); set.addAll((Collection<Byte>) elements); return set; } else { int size = elements instanceof Set ? ((Set) elements).size() : expectedSize; UpdatableQHashByteSetGO set = newUpdatableSet(size); for (byte e : elements) { set.add(e); } return set; } } }
void move(SeparateKVByteQHash 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(SeparateKVByteQHash 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(SeparateKVByteQHash hash) { super.copy(hash); freeValue = hash.freeValue(); if (hash.supportRemoved()) removedValue = hash.removedValue(); set = hash.keys().clone(); if (!hash.supportRemoved()) { removedValue = freeValue; removedValue = findNewFreeOrRemoved(); } }