@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(); }
public V computeIfPresent(Float key, BiFunction<? super Float, ? super V, ? extends V> remappingFunction) { int k = Float.floatToIntBits(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(Float.intBitsToFloat(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 HashFloatSet thisC, @Nonnull Collection<?> c) { if (c instanceof InternalFloatCollectionOps) return removeAll(thisC, (InternalFloatCollectionOps) c); if (thisC == c) throw new IllegalArgumentException(); if (isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) < FREE_BITS) { if (c.contains(Float.intBitsToFloat(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 V computeIfPresent(float key, FloatObjFunction<? super V, ? extends V> remappingFunction) { int k = Float.floatToIntBits(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(Float.intBitsToFloat(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(float key, FloatObjFunction<? super V, ? extends V> remappingFunction) { int k = Float.floatToIntBits(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(Float.intBitsToFloat(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 HashFloatSet thisC, @Nonnull Collection<?> c) { if (c instanceof InternalFloatCollectionOps) return removeAll(thisC, (InternalFloatCollectionOps) c); if (thisC == c) throw new IllegalArgumentException(); if (isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) < FREE_BITS) { if (c.contains(Float.intBitsToFloat(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 Float> filter) { if (filter == null) throw new java.lang.NullPointerException(); if (isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) < FREE_BITS) { if (filter.test(Float.intBitsToFloat(key))) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; vals[i] = null; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
if ((key = keys[i]) < FREE_BITS) { if (!c.contains(Float.intBitsToFloat(key))) { incrementModCount(); mc++; keys[i] = REMOVED_BITS;
@Override public boolean removeIf(FloatPredicate filter) { if (filter == null) throw new java.lang.NullPointerException(); if (isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) < FREE_BITS) { if (filter.test(Float.intBitsToFloat(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(FloatObjPredicate<? super V> filter) { if (filter == null) throw new java.lang.NullPointerException(); if (isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) < FREE_BITS) { if (filter.test(Float.intBitsToFloat(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(FloatObjPredicate<? super V> filter) { if (filter == null) throw new java.lang.NullPointerException(); if (isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) < FREE_BITS) { if (filter.test(Float.intBitsToFloat(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(FloatPredicate filter) { if (filter == null) throw new java.lang.NullPointerException(); if (isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) < FREE_BITS) { if (filter.test(Float.intBitsToFloat(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 Float> filter) { if (filter == null) throw new java.lang.NullPointerException(); if (isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) < FREE_BITS) { if (filter.test(Float.intBitsToFloat(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 HashFloatSet thisC, @Nonnull FloatCollection c) { if (c instanceof InternalFloatCollectionOps) return removeAll(thisC, (InternalFloatCollectionOps) c); if (thisC == c) throw new IllegalArgumentException(); if (isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) < FREE_BITS) { if (c.contains(Float.intBitsToFloat(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 HashFloatSet thisC, @Nonnull InternalFloatCollectionOps c) { if (thisC == c) throw new IllegalArgumentException(); if (isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int 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 HashFloatSet thisC, @Nonnull InternalFloatCollectionOps c) { if (thisC == c) throw new IllegalArgumentException(); if (isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int 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 HashFloatSet thisC, @Nonnull FloatCollection c) { if (c instanceof InternalFloatCollectionOps) return removeAll(thisC, (InternalFloatCollectionOps) c); if (thisC == c) throw new IllegalArgumentException(); if (isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); int[] keys = set; V[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) < FREE_BITS) { if (c.contains(Float.intBitsToFloat(key))) { incrementModCount(); mc++; keys[i] = REMOVED_BITS; vals[i] = null; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
if ((key = keys[i]) < FREE_BITS) { if (!c.contains(Float.intBitsToFloat(key))) { incrementModCount(); mc++; keys[i] = REMOVED_BITS;
if ((key = keys[i]) < FREE_BITS) { if (!c.contains(key)) { incrementModCount(); mc++; keys[i] = REMOVED_BITS;