public int setHashCode() { int hashCode = 0; int mc = modCount(); int free = freeValue; int[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { hashCode += key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }
public int setHashCode() { int hashCode = 0; int mc = modCount(); int free = freeValue; int[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { hashCode += key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }
@Override public boolean moveNext() { if (expectedModCount == modCount()) { int[] keys = this.keys; int free = this.free; for (int i = index - 1; i >= 0; i--) { int 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 Integer> action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; int[] keys = this.keys; int free = this.free; int nextI = nextIndex; for (int i = nextI; i >= 0; i--) { int key; if ((key = keys[i]) != free) { action.accept(key); } } if (nextI != nextIndex || mc != modCount()) { throw new java.util.ConcurrentModificationException(); } index = nextIndex = -1; }
@Nonnull public Object[] toArray() { int size = size(); Object[] result = new Object[size]; if (size == 0) return result; int resultIndex = 0; int mc = modCount(); int free = freeValue; int[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { result[resultIndex++] = key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }
@Nonnull public int[] toIntArray() { int size = size(); int[] result = new int[size]; if (size == 0) return result; int resultIndex = 0; int mc = modCount(); int free = freeValue; int[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { result[resultIndex++] = key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }
public IntIterator iterator() { int mc = modCount(); return new NoRemovedIterator(mc); }
public IntCursor setCursor() { int mc = modCount(); return new NoRemovedCursor(mc); }
public IntIterator iterator() { int mc = modCount(); return new NoRemovedIterator(mc); }
public IntCursor setCursor() { int mc = modCount(); return new NoRemovedCursor(mc); }
public boolean reverseAddAllTo(IntCollection c) { if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); int free = freeValue; int[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public void forEach(IntConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); int free = freeValue; int[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(IntConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); int free = freeValue; int[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(Consumer<? super Integer> action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); int free = freeValue; int[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public boolean reverseAddAllTo(IntCollection c) { if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); int free = freeValue; int[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public void forEachForward(IntConsumer action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; int[] keys = this.keys; int free = this.free; int index = this.index; for (int i = index - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { action.accept(key); } } if (index != this.index || mc != modCount()) { throw new java.util.ConcurrentModificationException(); } this.index = -1; curKey = free; }
@Override public void forEachRemaining(IntConsumer action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; int[] keys = this.keys; int free = this.free; int nextI = nextIndex; for (int i = nextI; i >= 0; i--) { int key; if ((key = keys[i]) != free) { action.accept(key); } } if (nextI != nextIndex || mc != modCount()) { throw new java.util.ConcurrentModificationException(); } index = nextIndex = -1; }
public boolean allContainingIn(IntCollection c) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); int free = freeValue; int[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { int 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 allContainingIn(IntCollection c) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); int free = freeValue; int[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { int 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(IntSet s) { if (this.isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); int free = freeValue; int[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { changed |= s.removeInt(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }