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 removed = removedValue; int[] tab = table; long base = INT_BASE + SHORT_KEY_OFFSET; if (noRemoved()) { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free) { action.accept(key); } } } else { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free && key != removed) { action.accept(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public String setToString() { if (this.isEmpty()) return "[]"; StringBuilder sb = new StringBuilder();
public String setToString() { if (this.isEmpty()) return "[]"; StringBuilder sb = new StringBuilder();
boolean removeAll(@Nonnull HashShortSet thisC, @Nonnull Collection<?> c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty() || c.isEmpty()) return false; boolean changed = false;
public void forEach(ShortConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); short free = freeValue; short removed = removedValue; int[] tab = table; long base = INT_BASE + SHORT_KEY_OFFSET; if (noRemoved()) { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free) { action.accept(key); } } } else { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free && key != removed) { action.accept(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
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 removed = removedValue; int[] tab = table; long base = INT_BASE + SHORT_KEY_OFFSET; if (noRemoved()) { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free) { action.accept(key); } } } else { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free && key != removed) { action.accept(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(ShortConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return; int mc = modCount(); short free = freeValue; short removed = removedValue; int[] tab = table; long base = INT_BASE + SHORT_KEY_OFFSET; if (noRemoved()) { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free) { action.accept(key); } } } else { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free && key != removed) { 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 removed = removedValue; int[] tab = table; long base = INT_BASE + SHORT_KEY_OFFSET; if (noRemoved()) { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free) { changed |= c.add(key); } } } else { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free && key != removed) { changed |= c.add(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseAddAllTo(ShortCollection c) { if (this.isEmpty()) return false; boolean changed = false; int mc = modCount(); short free = freeValue; short removed = removedValue; int[] tab = table; long base = INT_BASE + SHORT_KEY_OFFSET; if (noRemoved()) { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free) { changed |= c.add(key); } } } else { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free && key != removed) { changed |= c.add(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean removeIf(Predicate<? super Short> filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return false; boolean changed = false;
if (predicate == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return true; boolean terminated = false;
if (predicate == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return true; boolean terminated = false;
public boolean allContainingIn(ShortCollection c) { if (this.isEmpty()) return true; boolean containsAll = true;
public boolean allContainingIn(ShortCollection c) { if (this.isEmpty()) return true; boolean containsAll = true;
public boolean reverseRemoveAllFrom(ShortSet s) { if (this.isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); short free = freeValue; short removed = removedValue; int[] tab = table; long base = INT_BASE + SHORT_KEY_OFFSET; if (noRemoved()) { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free) { changed |= s.removeShort(key); } } } else { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free && key != removed) { 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 removed = removedValue; int[] tab = table; long base = INT_BASE + SHORT_KEY_OFFSET; if (noRemoved()) { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free) { changed |= s.removeShort(key); } } } else { for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { short key; if ((key = U.getShort(tab, base + off)) != free && key != removed) { changed |= s.removeShort(key); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
private boolean retainAll(@Nonnull HashShortSet thisC, @Nonnull ShortCollection c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty()) return false; if (c.isEmpty()) {
private boolean retainAll(@Nonnull HashShortSet thisC, @Nonnull ShortCollection c) { if (thisC == (Object) c) throw new IllegalArgumentException(); if (this.isEmpty()) return false; if (c.isEmpty()) {
public boolean removeIf(ShortPredicate filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return false; boolean changed = false;
public boolean removeIf(ShortPredicate filter) { if (filter == null) throw new java.lang.NullPointerException(); if (this.isEmpty()) return false; boolean changed = false;