@Override void removeAt(int index) { incrementModCount(); super.removeAt(index); values[index] = null; postRemoveHook(); }
@Override void removeAt(int index) { incrementModCount(); super.removeAt(index); values[index] = null; postRemoveHook(); }
@Override public V computeIfPresent(double key, DoubleObjFunction<? super V, ? extends V> remappingFunction) { long k = Double.doubleToLongBits(key); if (remappingFunction == null) throw new java.lang.NullPointerException(); int index = index(k); if (index >= 0) { // key is present V[] vals = values; V val; if ((val = vals[index]) != null) { V newValue = remappingFunction.apply(Double.longBitsToDouble(k), val); if (newValue != null) { vals[index] = newValue; return newValue; } else { incrementModCount(); set[index] = REMOVED_BITS; vals[index] = null; postRemoveHook(); return null; } } else { return null; } } else { // key is absent return null; } }
public V computeIfPresent(Double key, BiFunction<? super Double, ? super V, ? extends V> remappingFunction) { long k = Double.doubleToLongBits(key); if (remappingFunction == null) throw new java.lang.NullPointerException(); int index = index(k); if (index >= 0) { // key is present V[] vals = values; V val; if ((val = vals[index]) != null) { V newValue = remappingFunction.apply(Double.longBitsToDouble(k), val); if (newValue != null) { vals[index] = newValue; return newValue; } else { incrementModCount(); set[index] = REMOVED_BITS; vals[index] = null; postRemoveHook(); return null; } } else { return null; } } else { // key is absent return null; } }
@Override public V computeIfPresent(double key, DoubleObjFunction<? super V, ? extends V> remappingFunction) { long k = Double.doubleToLongBits(key); if (remappingFunction == null) throw new java.lang.NullPointerException(); int index = index(k); if (index >= 0) { // key is present V[] vals = values; V val; if ((val = vals[index]) != null) { V newValue = remappingFunction.apply(Double.longBitsToDouble(k), val); if (newValue != null) { vals[index] = newValue; return newValue; } else { incrementModCount(); set[index] = REMOVED_BITS; vals[index] = null; postRemoveHook(); return null; } } else { return null; } } else { // key is absent return null; } }
@Override public boolean removeAll(@Nonnull HashDoubleSet thisC, @Nonnull Collection<?> c) { if (c instanceof InternalDoubleCollectionOps) return removeAll(thisC, (InternalDoubleCollectionOps) c); if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; V[] vals = values; 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; vals[i] = null; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public boolean removeAll(@Nonnull HashDoubleSet thisC, @Nonnull Collection<?> c) { if (c instanceof InternalDoubleCollectionOps) return removeAll(thisC, (InternalDoubleCollectionOps) c); if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; V[] vals = values; 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; vals[i] = null; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public boolean removeIf(Predicate<? super Double> filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (filter.test(Double.longBitsToDouble(key))) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; vals[i] = null; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public boolean removeIf(DoublePredicate filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (filter.test(Double.longBitsToDouble(key))) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; vals[i] = null; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public boolean removeIf(DoubleObjPredicate<? super V> filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (filter.test(Double.longBitsToDouble(key), vals[i])) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; vals[i] = null; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public boolean removeIf(DoublePredicate filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (filter.test(Double.longBitsToDouble(key))) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; vals[i] = null; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public boolean removeIf(DoubleObjPredicate<? super V> filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (filter.test(Double.longBitsToDouble(key), vals[i])) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; vals[i] = null; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public boolean removeIf(Predicate<? super Double> filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (filter.test(Double.longBitsToDouble(key))) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; vals[i] = null; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override boolean removeAll(@Nonnull HashDoubleSet thisC, @Nonnull InternalDoubleCollectionOps c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; V[] vals = values; 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; vals[i] = null; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override boolean removeAll(@Nonnull HashDoubleSet thisC, @Nonnull InternalDoubleCollectionOps c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; V[] vals = values; 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; vals[i] = null; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override boolean removeAll(@Nonnull HashDoubleSet thisC, @Nonnull DoubleCollection c) { if (c instanceof InternalDoubleCollectionOps) return removeAll(thisC, (InternalDoubleCollectionOps) c); if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; V[] vals = values; 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; vals[i] = null; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
keys[i] = REMOVED_BITS; vals[i] = null; postRemoveHook(); changed = true;
keys[i] = REMOVED_BITS; vals[i] = null; postRemoveHook(); changed = true;
keys[i] = REMOVED_BITS; vals[i] = null; postRemoveHook(); changed = true;
keys[i] = REMOVED_BITS; vals[i] = null; postRemoveHook(); changed = true;