public void forEach(Consumer<? super Float> action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; 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) { action.accept(Float.intBitsToFloat(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(FloatConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; 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) { action.accept(Float.intBitsToFloat(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(FloatConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; 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) { action.accept(Float.intBitsToFloat(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public String setToString() { if (this.isEmpty()) return "[]"; StringBuilder sb = new StringBuilder(); int elementCount = 0; 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) { sb.append(' ').append(Float.intBitsToFloat(key)).append(','); if (++elementCount == 8) { int expectedLength = sb.length() * (size() / 8); sb.ensureCapacity(expectedLength + (expectedLength / 2)); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); sb.setCharAt(0, '['); sb.setCharAt(sb.length() - 1, ']'); return sb.toString(); }
public void forEach(Consumer<? super Float> action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; 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) { action.accept(Float.intBitsToFloat(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public boolean forEachWhile( FloatPredicate predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return true; boolean terminated = 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 (!predicate.test(Float.intBitsToFloat(key))) { 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; }
boolean reverseAddAllTo(InternalFloatCollectionOps c) { if (this.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) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
boolean allContainingIn(InternalFloatCollectionOps c) { if (this.isEmpty()) return true; boolean containsAll = true; 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(key)) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
boolean allContainingIn(InternalFloatCollectionOps c) { if (this.isEmpty()) return true; boolean containsAll = true; 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(key)) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
public boolean forEachWhile( FloatPredicate predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return true; boolean terminated = 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 (!predicate.test(Float.intBitsToFloat(key))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
public boolean removeIf(Predicate<? super Float> filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.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 (filter.test(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; }
boolean reverseAddAllTo(InternalFloatCollectionOps c) { if (this.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) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseAddAllTo(FloatCollection c) { if (c instanceof InternalFloatCollectionOps) return reverseAddAllTo((InternalFloatCollectionOps) c); if (this.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) { changed |= c.add(Float.intBitsToFloat(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseAddAllTo(FloatCollection c) { if (c instanceof InternalFloatCollectionOps) return reverseAddAllTo((InternalFloatCollectionOps) c); if (this.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) { changed |= c.add(Float.intBitsToFloat(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean removeIf(Predicate<? super Float> filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.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 (filter.test(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; }
boolean reverseRemoveAllFrom(InternalFloatCollectionOps s) { if (this.isEmpty() || s.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) { changed |= s.removeFloat(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
boolean reverseRemoveAllFrom(InternalFloatCollectionOps s) { if (this.isEmpty() || s.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) { changed |= s.removeFloat(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseRemoveAllFrom(FloatSet s) { if (s instanceof InternalFloatCollectionOps) return reverseRemoveAllFrom((InternalFloatCollectionOps) s); if (this.isEmpty() || s.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) { changed |= s.removeFloat(Float.intBitsToFloat(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseRemoveAllFrom(FloatSet s) { if (s instanceof InternalFloatCollectionOps) return reverseRemoveAllFrom((InternalFloatCollectionOps) s); if (this.isEmpty() || s.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) { changed |= s.removeFloat(Float.intBitsToFloat(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }