@Override public boolean moveNext() { if (expectedModCount == modCount()) { int[] tab = this.tab; char free = this.free; int entry; for (int i = index - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { index = i; curKey = key; return true; } } curKey = free; index = -1; return false; } else { throw new java.util.ConcurrentModificationException(); } }
public int setHashCode() { int hashCode = 0; int mc = modCount(); char free = freeValue; int[] tab = table; long base = INT_BASE + CHAR_KEY_OFFSET; for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { char key; if ((key = U.getChar(tab, base + off)) != free) { hashCode += key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }
public int setHashCode() { int hashCode = 0; int mc = modCount(); char free = freeValue; int[] tab = table; long base = INT_BASE + CHAR_KEY_OFFSET; for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { char key; if ((key = U.getChar(tab, base + off)) != free) { hashCode += key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }
public CharCursor setCursor() { int mc = modCount(); return new NoRemovedCursor(mc); }
public CharCursor setCursor() { int mc = modCount(); return new NoRemovedCursor(mc); }
public CharIterator iterator() { int mc = modCount(); return new NoRemovedIterator(mc); }
public CharIterator iterator() { int mc = modCount(); return new NoRemovedIterator(mc); }
@Override public void forEachRemaining(CharConsumer action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; int[] tab = this.tab; char free = this.free; int entry; int nextI = nextIndex; for (int i = nextI; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { action.accept(key); } } if (nextI != nextIndex || mc != modCount()) { throw new java.util.ConcurrentModificationException(); } nextIndex = -1; }
public void forEach(Consumer<? super Character> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; long base = INT_BASE + CHAR_KEY_OFFSET; for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { char key; if ((key = U.getChar(tab, base + off)) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void forEachRemaining(CharConsumer action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; int[] tab = this.tab; char free = this.free; int entry; int nextI = nextIndex; for (int i = nextI; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { action.accept(key); } } if (nextI != nextIndex || mc != modCount()) { throw new java.util.ConcurrentModificationException(); } 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(); char free = freeValue; int[] tab = table; long base = INT_BASE + CHAR_KEY_OFFSET; for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { char key; if ((key = U.getChar(tab, base + off)) != free) { result[resultIndex++] = key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }
public void forEach(CharConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; long base = INT_BASE + CHAR_KEY_OFFSET; for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { char key; if ((key = U.getChar(tab, base + off)) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(CharConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; long base = INT_BASE + CHAR_KEY_OFFSET; for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { char key; if ((key = U.getChar(tab, base + off)) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(Consumer<? super Character> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; long base = INT_BASE + CHAR_KEY_OFFSET; for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { char key; if ((key = U.getChar(tab, base + off)) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public boolean allContainingIn(CharCollection c) { if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); char free = freeValue; int[] tab = table; long base = INT_BASE + CHAR_KEY_OFFSET; for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { char key; if ((key = U.getChar(tab, base + off)) != free) { if (!c.contains(key)) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
public boolean reverseAddAllTo(CharCollection c) { if (isEmpty()) return false; boolean changed = false; int mc = modCount(); char free = freeValue; int[] tab = table; long base = INT_BASE + CHAR_KEY_OFFSET; for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { char key; if ((key = U.getChar(tab, base + off)) != free) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean allContainingIn(CharCollection c) { if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); char free = freeValue; int[] tab = table; long base = INT_BASE + CHAR_KEY_OFFSET; for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { char key; if ((key = U.getChar(tab, base + off)) != free) { if (!c.contains(key)) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
public boolean reverseAddAllTo(CharCollection c) { if (isEmpty()) return false; boolean changed = false; int mc = modCount(); char free = freeValue; int[] tab = table; long base = INT_BASE + CHAR_KEY_OFFSET; for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { char key; if ((key = U.getChar(tab, base + off)) != free) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseRemoveAllFrom(CharSet s) { if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); char free = freeValue; int[] tab = table; long base = INT_BASE + CHAR_KEY_OFFSET; for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { char key; if ((key = U.getChar(tab, base + off)) != free) { changed |= s.removeChar(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseRemoveAllFrom(CharSet s) { if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); char free = freeValue; int[] tab = table; long base = INT_BASE + CHAR_KEY_OFFSET; for (long off = ((long) tab.length) << INT_SCALE_SHIFT; (off -= INT_SCALE) >= 0L;) { char key; if ((key = U.getChar(tab, base + off)) != free) { changed |= s.removeChar(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }