@Override public void forEachRemaining(Consumer<? super Double> action) { if (action == null) throw new java.lang.NullPointerException(); long[] tab = this.tab; int nextI = nextIndex; for (int i = nextI; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { action.accept(Double.longBitsToDouble(tab[i + 1])); } } if (nextI != nextIndex) { throw new java.util.ConcurrentModificationException(); } nextIndex = -1; }
@Override public void forEachForward(@Nonnull IntConsumer intConsumer) { int localNumElements = numElements; for (int i = index; i < localNumElements; ++i) { intConsumer.accept(backingArray[i]); } if(localNumElements != numElements) { throw new ConcurrentModificationException(); } else { this.index = numElements; } }
@Override public void forEachRemaining(@Nonnull Consumer<? super Map.Entry<Double, Double>> action) { if (action == null) throw new java.lang.NullPointerException(); long[] tab = this.tab; int nextI = nextIndex; for (int i = nextI; i >= 0; i -= 2) { long key; if ((key = tab[i]) < FREE_BITS) { action.accept(new ImmutableEntry(key, tab[i + 1])); } } if (nextI != nextIndex) { throw new java.util.ConcurrentModificationException(); } nextIndex = -1; }
boolean removeAll(@Nonnull HashFloatSet thisC, @Nonnull Collection<?> c) { if (thisC == c) throw new IllegalArgumentException(); if (isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; long base = LONG_BASE + FLOAT_KEY_OFFSET; for (long off = ((long) tab.length) << LONG_SCALE_SHIFT; (off -= LONG_SCALE) >= 0L;) { int key; if ((key = U.getInt(tab, base + off)) < FREE_BITS) { if (c.contains(Float.intBitsToFloat(key))) { incrementModCount(); mc++; U.putInt(tab, base + off, REMOVED_BITS); postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public boolean forEachWhile(@Nonnull Predicate<? super Map.Entry<Double, Double>> predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return true; boolean terminated = false; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { long key; if ((key = tab[i]) < FREE_BITS) { if (!predicate.test(new MutableEntry(mc, i, key, tab[i + 1]))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
boolean removeAll(@Nonnull HashFloatSet thisC, @Nonnull Collection<?> c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; long base = LONG_BASE + FLOAT_KEY_OFFSET; for (long off = ((long) tab.length) << LONG_SCALE_SHIFT; (off -= LONG_SCALE) >= 0L;) { int key; if ((key = U.getInt(tab, base + off)) < FREE_BITS) { if (c.contains(Float.intBitsToFloat(key))) { incrementModCount(); mc++; U.putInt(tab, base + off, REMOVED_BITS); postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public void forEachRemaining(@Nonnull Consumer<? super Map.Entry<Double, Double>> action) { if (action == null) throw new java.lang.NullPointerException(); long[] tab = this.tab; int nextI = nextIndex; for (int i = nextI; i >= 0; i -= 2) { long key; if ((key = tab[i]) < FREE_BITS) { action.accept(new ImmutableEntry(key, tab[i + 1])); } } if (nextI != nextIndex) { throw new java.util.ConcurrentModificationException(); } nextIndex = -1; }
@Override public boolean forEachWhile(@Nonnull Predicate<? super Map.Entry<Double, Long>> predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (isEmpty()) return true; boolean terminated = false; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { long key; if ((key = tab[i]) < FREE_BITS) { if (!predicate.test(new MutableEntry(mc, i, key, tab[i + 1]))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
@Override public void forEachRemaining(Consumer<? super Double> action) { if (action == null) throw new java.lang.NullPointerException(); long[] tab = this.tab; int nextI = nextIndex; for (int i = nextI; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { action.accept(Double.longBitsToDouble(tab[i + 1])); } } if (nextI != nextIndex) { throw new java.util.ConcurrentModificationException(); } nextIndex = -1; }
@Override public void forEachRemaining(@Nonnull IntConsumer intConsumer) { int localNumElements = numElements; for (int i = index + 1; i < localNumElements - 1; ++i) { intConsumer.accept(backingArray[i]); } if (localNumElements != numElements) { throw new ConcurrentModificationException(); } else { index = numElements - 1; } }
boolean removeAll(@Nonnull HashFloatSet thisC, @Nonnull Collection<?> c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; long base = LONG_BASE + FLOAT_KEY_OFFSET; for (long off = ((long) tab.length) << LONG_SCALE_SHIFT; (off -= LONG_SCALE) >= 0L;) { int key; if ((key = U.getInt(tab, base + off)) < FREE_BITS) { if (c.contains(Float.intBitsToFloat(key))) { incrementModCount(); mc++; U.putInt(tab, base + off, REMOVED_BITS); postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public void forEachRemaining(@Nonnull Consumer<? super Map.Entry<Double, Long>> action) { if (action == null) throw new java.lang.NullPointerException(); long[] tab = this.tab; int nextI = nextIndex; for (int i = nextI; i >= 0; i -= 2) { long key; if ((key = tab[i]) < FREE_BITS) { action.accept(new ImmutableEntry(key, tab[i + 1])); } } if (nextI != nextIndex) { throw new java.util.ConcurrentModificationException(); } nextIndex = -1; }
@Override public boolean forEachWhile(@Nonnull Predicate<? super Map.Entry<Double, Long>> predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return true; boolean terminated = false; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { long key; if ((key = tab[i]) < FREE_BITS) { if (!predicate.test(new MutableEntry(mc, i, key, tab[i + 1]))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
@Override public void forEach(Consumer<? super Double> action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { action.accept(Double.longBitsToDouble(tab[i + 1])); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Nonnull @Override public synchronized final E previous() throws ConcurrentModificationException { if (!hasPrevious()) { throw new ConcurrentModificationException("No more elements (concurrency problem?)"); } return get(--index); }
boolean removeAll(@Nonnull HashDoubleSet thisC, @Nonnull Collection<?> c) { if (thisC == c) throw new IllegalArgumentException(); if (isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { long key; if ((key = tab[i]) < FREE_BITS) { if (c.contains(Double.longBitsToDouble(key))) { incrementModCount(); mc++; tab[i] = REMOVED_BITS; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public void forEachRemaining(@Nonnull Consumer<? super Map.Entry<Double, Long>> action) { if (action == null) throw new java.lang.NullPointerException(); long[] tab = this.tab; int nextI = nextIndex; for (int i = nextI; i >= 0; i -= 2) { long key; if ((key = tab[i]) < FREE_BITS) { action.accept(new ImmutableEntry(key, tab[i + 1])); } } if (nextI != nextIndex) { throw new java.util.ConcurrentModificationException(); } nextIndex = -1; }
@Override public boolean forEachWhile(@Nonnull Predicate<? super Map.Entry<Double, Double>> predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return true; boolean terminated = false; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { long key; if ((key = tab[i]) < FREE_BITS) { if (!predicate.test(new MutableEntry(mc, i, key, tab[i + 1]))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
public void forEach(Consumer<? super Double> action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { long key; if ((key = tab[i]) < FREE_BITS) { action.accept(Double.longBitsToDouble(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Nonnull @Override public synchronized final E next() throws ConcurrentModificationException { if (!hasNext()) { throw new ConcurrentModificationException("No more elements (concurrency problem?)"); } return get(++index); }