public int setHashCode() { int hashCode = 0; int mc = modCount(); short free = freeValue; short[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { short 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(); short free = freeValue; short[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { short key; if ((key = keys[i]) != free) { hashCode += key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }
public void forEach(Consumer<? super Short> action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); short free = freeValue; short[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { short key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public ShortCursor setCursor() { int mc = modCount(); return new NoRemovedCursor(mc); }
@Nonnull public short[] toShortArray() { int size = size(); short[] result = new short[size]; if (size == 0) return result; int resultIndex = 0; int mc = modCount(); short free = freeValue; short[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { short key; if ((key = keys[i]) != free) { result[resultIndex++] = key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }
public ShortIterator iterator() { int mc = modCount(); return new NoRemovedIterator(mc); }
public ShortCursor setCursor() { int mc = modCount(); return new NoRemovedCursor(mc); }
public ShortIterator iterator() { int mc = modCount(); return new NoRemovedIterator(mc); }
public void forEach(ShortConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); short free = freeValue; short[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { short key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public boolean reverseAddAllTo(ShortCollection c) { if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); short free = freeValue; short[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { short key; if ((key = keys[i]) != free) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public void forEach(ShortConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); short free = freeValue; short[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { short key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public boolean reverseAddAllTo(ShortCollection c) { if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); short free = freeValue; short[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { short key; if ((key = keys[i]) != free) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public void forEachRemaining(Consumer<? super Short> action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; short[] keys = this.keys; short free = this.free; int nextI = nextIndex; for (int i = nextI; i >= 0; i--) { short 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 Short> action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); short free = freeValue; short[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { short key; if ((key = keys[i]) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void forEachRemaining(ShortConsumer action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; short[] keys = this.keys; short free = this.free; int nextI = nextIndex; for (int i = nextI; i >= 0; i--) { short key; if ((key = keys[i]) != free) { action.accept(key); } } if (nextI != nextIndex || mc != modCount()) { throw new java.util.ConcurrentModificationException(); } index = nextIndex = -1; }
@Override public void forEachRemaining(ShortConsumer action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; short[] keys = this.keys; short free = this.free; int nextI = nextIndex; for (int i = nextI; i >= 0; i--) { short 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(ShortCollection c) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); short free = freeValue; short[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { short key; if ((key = keys[i]) != free) { if (!c.contains(key)) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override public void forEachForward(ShortConsumer action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; short[] keys = this.keys; short free = this.free; int index = this.index; for (int i = index - 1; i >= 0; i--) { short 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; }
public boolean reverseRemoveAllFrom(ShortSet s) { if (this.isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); short free = freeValue; short[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { short key; if ((key = keys[i]) != free) { changed |= s.removeShort(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseRemoveAllFrom(ShortSet s) { if (this.isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); short free = freeValue; short[] keys = set; for (int i = keys.length - 1; i >= 0; i--) { short key; if ((key = keys[i]) != free) { changed |= s.removeShort(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }