public int setHashCode() { int hashCode = 0; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { hashCode += ((int) (key ^ (key >>> 32))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }
public int setHashCode() { int hashCode = 0; int mc = modCount(); long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { hashCode += ((int) (key ^ (key >>> 32))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }
@Override public boolean moveNext() { if (expectedModCount == modCount()) { long[] keys = this.keys; for (int i = index - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { index = i; curKey = key; return true; } } curKey = FREE_BITS; index = -1; return false; } else { throw new java.util.ConcurrentModificationException(); } }
boolean reverseAddAllTo(InternalDoubleCollectionOps c) { if (this.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; }
public void forEach(Consumer<? super Double> action) { if (action == null) throw new java.lang.NullPointerException(); if (this.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 forEachRemaining(Consumer<? super Double> action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; long[] keys = this.keys; int nextI = nextIndex; for (int i = nextI; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { action.accept(Double.longBitsToDouble(key)); } } if (nextI != nextIndex || mc != modCount()) { throw new java.util.ConcurrentModificationException(); } index = nextIndex = -1; }
public void forEach(DoubleConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (this.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(); }
boolean reverseAddAllTo(InternalDoubleCollectionOps c) { if (this.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; }
@Override public void forEachRemaining(DoubleConsumer action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; long[] keys = this.keys; int nextI = nextIndex; for (int i = nextI; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { action.accept(Double.longBitsToDouble(key)); } } if (nextI != nextIndex || mc != modCount()) { throw new java.util.ConcurrentModificationException(); } index = nextIndex = -1; }
boolean reverseRemoveAllFrom(InternalDoubleCollectionOps s) { if (this.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 reverseAddAllTo(DoubleCollection c) { if (c instanceof InternalDoubleCollectionOps) return reverseAddAllTo((InternalDoubleCollectionOps) c); if (this.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; }
boolean reverseRemoveAllFrom(InternalDoubleCollectionOps s) { if (this.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; }
@Override public void remove() { if (curKey != FREE_BITS) { if (expectedModCount++ == modCount()) { this.curKey = FREE_BITS; incrementModCount(); keys[index] = REMOVED_BITS; postRemoveHook(); } else { throw new java.util.ConcurrentModificationException(); } } else { throw new java.lang.IllegalStateException(); } } }
@Override public void remove() { if (curKey != FREE_BITS) { if (expectedModCount++ == modCount()) { this.curKey = FREE_BITS; incrementModCount(); keys[index] = REMOVED_BITS; postRemoveHook(); } else { throw new java.util.ConcurrentModificationException(); } } else { throw new java.lang.IllegalStateException(); } } }
@Override public void remove() { if (curKey != FREE_BITS) { if (expectedModCount++ == modCount()) { this.curKey = FREE_BITS; incrementModCount(); keys[index] = REMOVED_BITS; postRemoveHook(); } else { throw new java.util.ConcurrentModificationException(); } } else { throw new java.lang.IllegalStateException(); } } }
public boolean reverseRemoveAllFrom(DoubleSet s) { if (s instanceof InternalDoubleCollectionOps) return reverseRemoveAllFrom((InternalDoubleCollectionOps) s); if (this.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 DoubleIterator iterator() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedIterator( mc); return new NoRemovedIterator(mc); }
public DoubleCursor setCursor() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedCursor(mc); return new NoRemovedCursor(mc); }
public DoubleIterator iterator() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedIterator( mc); return new NoRemovedIterator(mc); }
public DoubleCursor setCursor() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedCursor(mc); return new NoRemovedCursor(mc); }