public int setHashCode() { int hashCode = 0; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { 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 free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { 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; long free = this.free; for (int i = index - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { index = i; curKey = key; return true; } } curKey = free; index = -1; return false; } else { throw new java.util.ConcurrentModificationException(); } }
@Override public void forEachRemaining(Consumer<? super Long> action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; long[] keys = this.keys; long free = this.free; int nextI = nextIndex; for (int i = nextI; i >= 0; i--) { long key; if ((key = keys[i]) != free) { action.accept(key); } } if (nextI != nextIndex || mc != modCount()) { throw new java.util.ConcurrentModificationException(); } index = nextIndex = -1; }
public void forEach(Consumer<? super Long> action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public LongIterator iterator() { int mc = modCount(); return new NoRemovedIterator(mc); }
public LongCursor setCursor() { int mc = modCount(); return new NoRemovedCursor(mc); }
@Nonnull public long[] toLongArray() { int size = size(); long[] result = new long[size]; if (size == 0) return result; int resultIndex = 0; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { result[resultIndex++] = key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }
public LongCursor setCursor() { int mc = modCount(); return new NoRemovedCursor(mc); }
@Nonnull public Object[] toArray() { int size = size(); Object[] result = new Object[size]; if (size == 0) return result; int resultIndex = 0; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { result[resultIndex++] = key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }
public LongIterator iterator() { int mc = modCount(); return new NoRemovedIterator(mc); }
public void forEach(LongConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public boolean reverseAddAllTo(LongCollection c) { if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public void forEach(LongConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(Consumer<? super Long> action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEachRemaining(Consumer<? super Long> action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; long[] keys = this.keys; long free = this.free; int nextI = nextIndex; for (int i = nextI; i >= 0; i--) { long key; if ((key = keys[i]) != free) { action.accept(key); } } if (nextI != nextIndex || mc != modCount()) { throw new java.util.ConcurrentModificationException(); } index = nextIndex = -1; }
public boolean reverseAddAllTo(LongCollection c) { if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean allContainingIn(LongCollection c) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { if (!c.contains(key)) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
public boolean reverseRemoveAllFrom(LongSet s) { if (this.isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { changed |= s.removeLong(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseRemoveAllFrom(LongSet s) { if (this.isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); long free = freeValue; long[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) != free) { changed |= s.removeLong(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }