@Override public void clear() { int mc = modCount() + 1; super.clear(); if (mc != modCount()) throw new ConcurrentModificationException(); } }
@Override public void clear() { int mc = modCount() + 1; super.clear(); if (mc != modCount()) throw new ConcurrentModificationException(); } }
boolean retainAll(@Nonnull HashDoubleSet thisC, @Nonnull Collection<?> c) { if (c instanceof DoubleCollection) return retainAll(thisC, (DoubleCollection) c); if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty()) return false; if (c.isEmpty()) { clear(); return true; } boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!c.contains(Double.longBitsToDouble(key))) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
boolean retainAll(@Nonnull HashDoubleSet thisC, @Nonnull Collection<?> c) { if (c instanceof DoubleCollection) return retainAll(thisC, (DoubleCollection) c); if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty()) return false; if (c.isEmpty()) { clear(); return true; } boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!c.contains(Double.longBitsToDouble(key))) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
private boolean retainAll(@Nonnull HashDoubleSet thisC, @Nonnull InternalDoubleCollectionOps c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty()) return false; if (c.isEmpty()) { clear(); return true; } boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!c.contains(key)) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
private boolean retainAll(@Nonnull HashDoubleSet thisC, @Nonnull InternalDoubleCollectionOps c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty()) return false; if (c.isEmpty()) { clear(); return true; } boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!c.contains(key)) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
private boolean retainAll(@Nonnull HashDoubleSet thisC, @Nonnull DoubleCollection c) { if (c instanceof InternalDoubleCollectionOps) return retainAll(thisC, (InternalDoubleCollectionOps) c); if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty()) return false; if (c.isEmpty()) { clear(); return true; } boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!c.contains(Double.longBitsToDouble(key))) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
private boolean retainAll(@Nonnull HashDoubleSet thisC, @Nonnull DoubleCollection c) { if (c instanceof InternalDoubleCollectionOps) return retainAll(thisC, (InternalDoubleCollectionOps) c); if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty()) return false; if (c.isEmpty()) { clear(); return true; } boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!c.contains(Double.longBitsToDouble(key))) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }