@Override public boolean reverseAddAllTo(ByteCollection c) { if (this.isEmpty()) return false; boolean changed = false; long free = freeValue; long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { if (keys[i] != free) { changed |= c.add(vals[i]); } } return changed; }
@Override public boolean test(/* raw */byte value) { return collection.contains(value); } });
public static /*<>*/ boolean addAll(final ByteCollection/*<>*/ collection, Collection<? extends Byte> another) { if (collection == another) throw new IllegalArgumentException(); long maxPossibleSize = collection.sizeAsLong() + Containers.sizeAsLong(another); collection.ensureCapacity(maxPossibleSize); if (another instanceof ByteCollection) { if (another instanceof InternalByteCollectionOps) { return ((InternalByteCollectionOps) another).reverseAddAllTo(collection); } else { class AddAll implements /*f*/ByteConsumer/*<>*/ { boolean collectionChanged = false; @Override public void accept(byte value) { collectionChanged |= collection.add(value); } } AddAll addAll = new AddAll(); ((ByteCollection) another).forEach(addAll); return addAll.collectionChanged; } } else { boolean collectionChanged = false; for (Byte v : another) { collectionChanged |= collection.add(v/* if !(obj elem) */.byteValue()/* endif */); } return collectionChanged; } }
collection.size() < another.size()) { return false; return c2.forEachWhile(new /*f*/BytePredicate/**/() { @Override } else { for (Object o : another) { if (!collection.contains(/* if !(obj elem) */((Byte) o).byteValue()
private boolean removeAll(ByteCollection c) { if (this == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { if (keys[i] < FREE_BITS) { if (c.contains(vals[i])) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
private boolean removeAll(ByteCollection c) { if (this == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { if (keys[i] < FREE_BITS) { if (c.contains(vals[i])) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
collection.size() < another.size()) { return false; return c2.forEachWhile(new /*f*/BytePredicate/**/() { @Override } else { for (Object o : another) { if (!collection.contains(/* if !(obj elem) */((Byte) o).byteValue()
boolean removeAll(@Nonnull HashByteSet thisC, @Nonnull ByteCollection c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false; byte key; if ((key = U.getByte(tab, base + off)) != free) { if (c.contains(key)) { incrementModCount(); mc++; byte key; if ((key = U.getByte(tab, base + off)) != free && key != removed) { if (c.contains(key)) { incrementModCount(); mc++;
@Override public boolean test(/* raw */byte value) { return collection.contains(value); } });
public boolean reverseAddAllTo(ByteCollection c) { if (this.isEmpty()) return false; boolean changed = false; byte free = freeValue; char[] tab = table; long base = CHAR_BASE + BYTE_KEY_OFFSET; for (long off = ((long) tab.length) << CHAR_SCALE_SHIFT; (off -= CHAR_SCALE) >= 0L;) { byte key; if ((key = U.getByte(tab, base + off)) != free) { changed |= c.add(key); } } return changed; }
public static /*<>*/ boolean addAll(final ByteCollection/*<>*/ collection, Collection<? extends Byte> another) { if (collection == another) throw new IllegalArgumentException(); long maxPossibleSize = collection.sizeAsLong() + Containers.sizeAsLong(another); collection.ensureCapacity(maxPossibleSize); if (another instanceof ByteCollection) { if (another instanceof InternalByteCollectionOps) { return ((InternalByteCollectionOps) another).reverseAddAllTo(collection); } else { class AddAll implements /*f*/ByteConsumer/*<>*/ { boolean collectionChanged = false; @Override public void accept(byte value) { collectionChanged |= collection.add(value); } } AddAll addAll = new AddAll(); ((ByteCollection) another).forEach(addAll); return addAll.collectionChanged; } } else { boolean collectionChanged = false; for (Byte v : another) { collectionChanged |= collection.add(v/* if !(obj elem) */.byteValue()/* endif */); } return collectionChanged; } }
private boolean removeAll(ByteCollection c) { if (this == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { if (keys[i] < FREE_BITS) { if (c.contains(vals[i])) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean allContainingIn(ByteCollection c) { if (this.isEmpty()) return true; boolean containsAll = true; byte free = freeValue; byte[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { byte key; if ((key = keys[i]) != free) { if (!c.contains(key)) { containsAll = false; break; } } } return containsAll; }
@Override public boolean reverseAddAllTo(ByteCollection c) { if (this.isEmpty()) return false; boolean changed = false; char free = freeValue; char[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { if (keys[i] != free) { changed |= c.add(vals[i]); } } return changed; }
private boolean removeAll(ByteCollection c) { if (this == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { if (keys[i] < FREE_BITS) { if (c.contains(vals[i])) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public boolean allContainingIn(ByteCollection c) { if (this.isEmpty()) return true; boolean containsAll = true; long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { if (keys[i] < FREE_BITS) { if (!c.contains(vals[i])) { containsAll = false; break; } } } return containsAll; }
public boolean reverseAddAllTo(ByteCollection c) { if (this.isEmpty()) return false; boolean changed = false; byte free = freeValue; byte[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { byte key; if ((key = keys[i]) != free) { changed |= c.add(key); } } return changed; }
boolean removeAll(@Nonnull HashByteSet thisC, @Nonnull ByteCollection c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false; byte key; if ((key = U.getByte(tab, base + off)) != free) { if (c.contains(key)) { incrementModCount(); mc++; byte key; if ((key = U.getByte(tab, base + off)) != free && key != removed) { if (c.contains(key)) { incrementModCount(); mc++;
@Override public boolean allContainingIn(ByteCollection c) { if (this.isEmpty()) return true; boolean containsAll = true; long free = freeValue; long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { if (keys[i] != free) { if (!c.contains(vals[i])) { containsAll = false; break; } } } return containsAll; }
@Override public boolean reverseAddAllTo(ByteCollection c) { if (this.isEmpty()) return false; boolean changed = false; long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { if (keys[i] < FREE_BITS) { changed |= c.add(vals[i]); } } return changed; }