public void forEach(Consumer<? super Double> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { action.accept(Double.longBitsToDouble(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public String setToString() { if (isEmpty()) return "[]"; StringBuilder sb = new StringBuilder(); int elementCount = 0; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { sb.append(' ').append(Double.longBitsToDouble(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(DoubleConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { action.accept(Double.longBitsToDouble(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(Consumer<? super Double> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { action.accept(Double.longBitsToDouble(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(DoubleConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { action.accept(Double.longBitsToDouble(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public boolean forEachWhile( DoublePredicate predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (isEmpty()) return true; boolean terminated = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!predicate.test(Double.longBitsToDouble(key))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
boolean reverseAddAllTo(InternalDoubleCollectionOps c) { if (isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
boolean reverseAddAllTo(InternalDoubleCollectionOps c) { if (isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
boolean allContainingIn(InternalDoubleCollectionOps c) { if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!c.contains(key)) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
boolean allContainingIn(InternalDoubleCollectionOps c) { if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!c.contains(key)) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
public boolean reverseAddAllTo(DoubleCollection c) { if (c instanceof InternalDoubleCollectionOps) return reverseAddAllTo((InternalDoubleCollectionOps) c); if (isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { changed |= c.add(Double.longBitsToDouble(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseAddAllTo(DoubleCollection c) { if (c instanceof InternalDoubleCollectionOps) return reverseAddAllTo((InternalDoubleCollectionOps) c); if (isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { changed |= c.add(Double.longBitsToDouble(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean allContainingIn(DoubleCollection c) { if (c instanceof InternalDoubleCollectionOps) return allContainingIn((InternalDoubleCollectionOps) c); if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!c.contains(Double.longBitsToDouble(key))) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
boolean reverseRemoveAllFrom(InternalDoubleCollectionOps s) { if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { changed |= s.removeDouble(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean allContainingIn(DoubleCollection c) { if (c instanceof InternalDoubleCollectionOps) return allContainingIn((InternalDoubleCollectionOps) c); if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!c.contains(Double.longBitsToDouble(key))) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
boolean reverseRemoveAllFrom(InternalDoubleCollectionOps s) { if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { changed |= s.removeDouble(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
boolean removeAll(@Nonnull HashDoubleSet thisC, @Nonnull InternalDoubleCollectionOps c) { if (thisC == c) throw new IllegalArgumentException(); if (isEmpty() || c.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; 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; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseRemoveAllFrom(DoubleSet s) { if (s instanceof InternalDoubleCollectionOps) return reverseRemoveAllFrom((InternalDoubleCollectionOps) s); if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { changed |= s.removeDouble(Double.longBitsToDouble(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean removeIf(DoublePredicate filter) { if (filter == null) throw new java.lang.NullPointerException(); if (isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; 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; postRemoveHook(); changed = true; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseRemoveAllFrom(DoubleSet s) { if (s instanceof InternalDoubleCollectionOps) return reverseRemoveAllFrom((InternalDoubleCollectionOps) s); if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { changed |= s.removeDouble(Double.longBitsToDouble(key)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }