public int setHashCode() { int hashCode = 0; int mc = modCount(); byte free = freeValue; char[] tab = table; long base = CHAR_BASE + BYTE_KEY_OFFSET; for (long off = ((long) tab.length) << CHAR_SCALE_SHIFT; (off -= CHAR_SCALE) >= 0L;) { byte key; if ((key = U.getByte(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(); byte free = freeValue; char[] tab = table; long base = CHAR_BASE + BYTE_KEY_OFFSET; for (long off = ((long) tab.length) << CHAR_SCALE_SHIFT; (off -= CHAR_SCALE) >= 0L;) { byte key; if ((key = U.getByte(tab, base + off)) != free) { hashCode += key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }
@Override public boolean moveNext() { if (expectedModCount == modCount()) { char[] tab = this.tab; byte free = this.free; int entry; for (int i = index - 1; i >= 0; i--) { byte key; if ((key = (byte) (entry = tab[i])) != free) { index = i; curKey = key; return true; } } curKey = free; index = -1; return false; } else { throw new java.util.ConcurrentModificationException(); } }
public ByteIterator iterator() { int mc = modCount(); return new NoRemovedIterator(mc); }
public ByteIterator iterator() { int mc = modCount(); return new NoRemovedIterator(mc); }
public ByteCursor setCursor() { int mc = modCount(); return new NoRemovedCursor(mc); }
public void forEach(Consumer<? super Byte> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); byte free = freeValue; char[] tab = table; long base = CHAR_BASE + BYTE_KEY_OFFSET; for (long off = ((long) tab.length) << CHAR_SCALE_SHIFT; (off -= CHAR_SCALE) >= 0L;) { byte key; if ((key = U.getByte(tab, base + off)) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public ByteCursor setCursor() { int mc = modCount(); return new NoRemovedCursor(mc); }
@Nonnull public byte[] toByteArray() { int size = size(); byte[] result = new byte[size]; if (size == 0) return result; int resultIndex = 0; int mc = modCount(); byte free = freeValue; char[] tab = table; long base = CHAR_BASE + BYTE_KEY_OFFSET; for (long off = ((long) tab.length) << CHAR_SCALE_SHIFT; (off -= CHAR_SCALE) >= 0L;) { byte key; if ((key = U.getByte(tab, base + off)) != free) { result[resultIndex++] = key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }
@Nonnull public Object[] toArray() { int size = size(); Object[] result = new Object[size]; if (size == 0) return result; int resultIndex = 0; int mc = modCount(); byte free = freeValue; char[] tab = table; long base = CHAR_BASE + BYTE_KEY_OFFSET; for (long off = ((long) tab.length) << CHAR_SCALE_SHIFT; (off -= CHAR_SCALE) >= 0L;) { byte key; if ((key = U.getByte(tab, base + off)) != free) { result[resultIndex++] = key; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return result; }
public boolean reverseAddAllTo(ByteCollection c) { if (isEmpty()) return false; boolean changed = false; int mc = modCount(); byte free = freeValue; char[] tab = table; long base = CHAR_BASE + BYTE_KEY_OFFSET; for (long off = ((long) tab.length) << CHAR_SCALE_SHIFT; (off -= CHAR_SCALE) >= 0L;) { byte key; if ((key = U.getByte(tab, base + off)) != free) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
@Override public void forEachRemaining(ByteConsumer action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; char[] tab = this.tab; byte free = this.free; int entry; int nextI = nextIndex; for (int i = nextI; i >= 0; i--) { byte key; if ((key = (byte) (entry = tab[i])) != free) { action.accept(key); } } if (nextI != nextIndex || mc != modCount()) { throw new java.util.ConcurrentModificationException(); } nextIndex = -1; }
public boolean reverseAddAllTo(ByteCollection c) { if (isEmpty()) return false; boolean changed = false; int mc = modCount(); byte free = freeValue; char[] tab = table; long base = CHAR_BASE + BYTE_KEY_OFFSET; for (long off = ((long) tab.length) << CHAR_SCALE_SHIFT; (off -= CHAR_SCALE) >= 0L;) { byte key; if ((key = U.getByte(tab, base + off)) != free) { changed |= c.add(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public void forEach(ByteConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); byte free = freeValue; char[] tab = table; long base = CHAR_BASE + BYTE_KEY_OFFSET; for (long off = ((long) tab.length) << CHAR_SCALE_SHIFT; (off -= CHAR_SCALE) >= 0L;) { byte key; if ((key = U.getByte(tab, base + off)) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(ByteConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); byte free = freeValue; char[] tab = table; long base = CHAR_BASE + BYTE_KEY_OFFSET; for (long off = ((long) tab.length) << CHAR_SCALE_SHIFT; (off -= CHAR_SCALE) >= 0L;) { byte key; if ((key = U.getByte(tab, base + off)) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(Consumer<? super Byte> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); byte free = freeValue; char[] tab = table; long base = CHAR_BASE + BYTE_KEY_OFFSET; for (long off = ((long) tab.length) << CHAR_SCALE_SHIFT; (off -= CHAR_SCALE) >= 0L;) { byte key; if ((key = U.getByte(tab, base + off)) != free) { action.accept(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEachRemaining(Consumer<? super Byte> action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; char[] tab = this.tab; byte free = this.free; int entry; int nextI = nextIndex; for (int i = nextI; i >= 0; i--) { byte key; if ((key = (byte) (entry = tab[i])) != free) { action.accept(key); } } if (nextI != nextIndex || mc != modCount()) { throw new java.util.ConcurrentModificationException(); } nextIndex = -1; }
@Override public void forEachForward(ByteConsumer action) { if (action == null) throw new java.lang.NullPointerException(); int mc = expectedModCount; char[] tab = this.tab; byte free = this.free; int entry; int index = this.index; for (int i = index - 1; i >= 0; i--) { byte key; if ((key = (byte) (entry = tab[i])) != free) { action.accept(key); } } if (index != this.index || mc != modCount()) { throw new java.util.ConcurrentModificationException(); } this.index = -1; curKey = free; }
public boolean reverseRemoveAllFrom(ByteSet s) { if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); byte free = freeValue; char[] tab = table; long base = CHAR_BASE + BYTE_KEY_OFFSET; for (long off = ((long) tab.length) << CHAR_SCALE_SHIFT; (off -= CHAR_SCALE) >= 0L;) { byte key; if ((key = U.getByte(tab, base + off)) != free) { changed |= s.removeByte(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }
public boolean reverseRemoveAllFrom(ByteSet s) { if (isEmpty() || s.isEmpty()) return false; boolean changed = false; int mc = modCount(); byte free = freeValue; char[] tab = table; long base = CHAR_BASE + BYTE_KEY_OFFSET; for (long off = ((long) tab.length) << CHAR_SCALE_SHIFT; (off -= CHAR_SCALE) >= 0L;) { byte key; if ((key = U.getByte(tab, base + off)) != free) { changed |= s.removeByte(key); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return changed; }