@Override public String toString() { if (isEmpty()) return "[]"; StringBuilder sb = new StringBuilder(); int elementCount = 0; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { sb.append(' ').append(Float.intBitsToFloat((int) (entry >>> 32))).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(); }
@Override public void forEach(Consumer<? super Float> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { action.accept(Float.intBitsToFloat((int) (entry >>> 32))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public String toString() { if (isEmpty()) return "[]"; StringBuilder sb = new StringBuilder(); int elementCount = 0; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { sb.append(' ').append(Float.intBitsToFloat((int) (entry >>> 32))).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(); }
@Override public boolean forEachWhile(FloatPredicate predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (isEmpty()) return true; boolean terminated = false; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { if (!predicate.test(Float.intBitsToFloat((int) (entry >>> 32)))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
@Override public boolean allContainingIn(FloatCollection c) { if (c instanceof InternalFloatCollectionOps) return allContainingIn((InternalFloatCollectionOps) c); if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { if (!c.contains(Float.intBitsToFloat((int) (entry >>> 32)))) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override public boolean forEachWhile(FloatPredicate predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (isEmpty()) return true; boolean terminated = false; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { if (!predicate.test(Float.intBitsToFloat((int) (entry >>> 32)))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
@Override public boolean reverseRemoveAllFrom(FloatSet s) { if (s instanceof InternalFloatCollectionOps) return reverseRemoveAllFrom((InternalFloatCollectionOps) s); if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { changed |= s.removeFloat(Float.intBitsToFloat((int) (entry >>> 32))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public boolean allContainingIn(FloatCollection c) { if (c instanceof InternalFloatCollectionOps) return allContainingIn((InternalFloatCollectionOps) c); if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { if (!c.contains(Float.intBitsToFloat((int) (entry >>> 32)))) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
private boolean allContainingIn(InternalFloatCollectionOps c) { if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { if (!c.contains((int) (entry >>> 32))) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override public boolean reverseAddAllTo(FloatCollection c) { if (c instanceof InternalFloatCollectionOps) return reverseAddAllTo((InternalFloatCollectionOps) c); if (isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { changed |= c.add(Float.intBitsToFloat((int) (entry >>> 32))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
private boolean allContainingIn(InternalFloatCollectionOps c) { if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { if (!c.contains((int) (entry >>> 32))) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override public boolean reverseAddAllTo(FloatCollection c) { if (c instanceof InternalFloatCollectionOps) return reverseAddAllTo((InternalFloatCollectionOps) c); if (isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { changed |= c.add(Float.intBitsToFloat((int) (entry >>> 32))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public boolean reverseRemoveAllFrom(FloatSet s) { if (s instanceof InternalFloatCollectionOps) return reverseRemoveAllFrom((InternalFloatCollectionOps) s); if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { changed |= s.removeFloat(Float.intBitsToFloat((int) (entry >>> 32))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public void forEach(FloatConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { action.accept(Float.intBitsToFloat((int) (entry >>> 32))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void forEach(FloatConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { action.accept(Float.intBitsToFloat((int) (entry >>> 32))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
private boolean reverseRemoveAllFrom(InternalFloatCollectionOps s) { if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { changed |= s.removeFloat((int) (entry >>> 32)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
private boolean reverseAddAllTo(InternalFloatCollectionOps c) { if (isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { changed |= c.add((int) (entry >>> 32)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
private boolean reverseAddAllTo(InternalFloatCollectionOps c) { if (isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { changed |= c.add((int) (entry >>> 32)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public void forEach(Consumer<? super Float> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { action.accept(Float.intBitsToFloat((int) (entry >>> 32))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
private boolean reverseRemoveAllFrom(InternalFloatCollectionOps s) { if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; long entry; for (int i = tab.length - 1; i >= 0; i--) { if ((int) (entry = tab[i]) < FREE_BITS) { changed |= s.removeFloat((int) (entry >>> 32)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }