@Override public String toString() { if (isEmpty()) return "[]"; StringBuilder sb = new StringBuilder(); int elementCount = 0; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { sb.append(' ').append(Double.longBitsToDouble(tab[i + 1])).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 String toString() { if (isEmpty()) return "[]"; StringBuilder sb = new StringBuilder(); int elementCount = 0; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { sb.append(' ').append(Double.longBitsToDouble(tab[i + 1])).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 Double> action) { if (action == null) throw new java.lang.NullPointerException(); if (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(); }
@Override public boolean forEachWhile(DoublePredicate 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) { if (tab[i] < FREE_BITS) { if (!predicate.test(Double.longBitsToDouble(tab[i + 1]))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
@Override public boolean allContainingIn(DoubleCollection c) { if (c instanceof InternalDoubleCollectionOps) return allContainingIn((InternalDoubleCollectionOps) c); if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { if (!c.contains(Double.longBitsToDouble(tab[i + 1]))) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override public boolean forEachWhile(DoublePredicate 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) { if (tab[i] < FREE_BITS) { if (!predicate.test(Double.longBitsToDouble(tab[i + 1]))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
@Override public boolean allContainingIn(DoubleCollection c) { if (c instanceof InternalDoubleCollectionOps) return allContainingIn((InternalDoubleCollectionOps) c); if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { if (!c.contains(Double.longBitsToDouble(tab[i + 1]))) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override 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[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { changed |= s.removeDouble(Double.longBitsToDouble(tab[i + 1])); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override 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[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { changed |= s.removeDouble(Double.longBitsToDouble(tab[i + 1])); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
private boolean allContainingIn(InternalDoubleCollectionOps c) { if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { if (!c.contains(tab[i + 1])) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override public boolean reverseAddAllTo(DoubleCollection c) { if (c instanceof InternalDoubleCollectionOps) return reverseAddAllTo((InternalDoubleCollectionOps) c); if (isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { changed |= c.add(Double.longBitsToDouble(tab[i + 1])); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public boolean reverseAddAllTo(DoubleCollection c) { if (c instanceof InternalDoubleCollectionOps) return reverseAddAllTo((InternalDoubleCollectionOps) c); if (isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { changed |= c.add(Double.longBitsToDouble(tab[i + 1])); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public void forEach(DoubleConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (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(); }
private boolean allContainingIn(InternalDoubleCollectionOps c) { if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { if (!c.contains(tab[i + 1])) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
private boolean reverseRemoveAllFrom(InternalDoubleCollectionOps s) { if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { changed |= s.removeDouble(tab[i + 1]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
private boolean reverseAddAllTo(InternalDoubleCollectionOps c) { if (isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { changed |= c.add(tab[i + 1]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
private boolean reverseRemoveAllFrom(InternalDoubleCollectionOps s) { if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { changed |= s.removeDouble(tab[i + 1]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public void forEach(Consumer<? super Double> action) { if (action == null) throw new java.lang.NullPointerException(); if (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(); }
@Override public void forEach(DoubleConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (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(); }
private boolean reverseAddAllTo(InternalDoubleCollectionOps c) { if (isEmpty()) return false; boolean changed = false; int mc = modCount(); long[] tab = table; for (int i = tab.length - 2; i >= 0; i -= 2) { if (tab[i] < FREE_BITS) { changed |= c.add(tab[i + 1]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }