@Override public void replaceAll( BiFunction<? super Character, ? super Short, ? extends Short> function) { if (function == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { U.putShort(tab, INT_BASE + SHORT_VALUE_OFFSET + (((long) (i)) << INT_SCALE_SHIFT), function.apply(key, (short) (entry >>> 16))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void forEach(BiConsumer<? super Character, ? super Short> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { action.accept(key, (short) (entry >>> 16)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void replaceAll(CharShortToShortFunction function) { if (function == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { U.putShort(tab, INT_BASE + SHORT_VALUE_OFFSET + (((long) (i)) << INT_SCALE_SHIFT), function.applyAsShort(key, (short) (entry >>> 16))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void replaceAll(CharShortToShortFunction function) { if (function == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { U.putShort(tab, INT_BASE + SHORT_VALUE_OFFSET + (((long) (i)) << INT_SCALE_SHIFT), function.applyAsShort(key, (short) (entry >>> 16))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public String toString() { if (isEmpty()) return "{}"; StringBuilder sb = new StringBuilder(); int elementCount = 0; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { sb.append(' '); sb.append(key); sb.append('='); sb.append((short) (entry >>> 16)); sb.append(','); if (++elementCount == 8) { int expectedLength = sb.length() * (size() / 8); sb.ensureCapacity(expectedLength + (expectedLength / 2)); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); sb.setCharAt(0, '{'); sb.setCharAt(sb.length() - 1, '}'); return sb.toString(); }
@Override public String toString() { if (isEmpty()) return "{}"; StringBuilder sb = new StringBuilder(); int elementCount = 0; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { sb.append(' '); sb.append(key); sb.append('='); sb.append((short) (entry >>> 16)); sb.append(','); if (++elementCount == 8) { int expectedLength = sb.length() * (size() / 8); sb.ensureCapacity(expectedLength + (expectedLength / 2)); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); sb.setCharAt(0, '{'); sb.setCharAt(sb.length() - 1, '}'); return sb.toString(); }
public void replaceAll( BiFunction<? super Character, ? super Short, ? extends Short> function) { if (function == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { U.putShort(tab, INT_BASE + SHORT_VALUE_OFFSET + (((long) (i)) << INT_SCALE_SHIFT), function.apply(key, (short) (entry >>> 16))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void forEach(CharShortConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { action.accept(key, (short) (entry >>> 16)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(BiConsumer<? super Character, ? super Short> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { action.accept(key, (short) (entry >>> 16)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void forEach(CharShortConsumer action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { action.accept(key, (short) (entry >>> 16)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalCharShortMapOps m) { if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { m.justPut(key, (short) (entry >>> 16)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalCharShortMapOps m) { if (isEmpty()) return; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { m.justPut(key, (short) (entry >>> 16)); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public boolean forEachWhile(CharShortPredicate predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (isEmpty()) return true; boolean terminated = false; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { if (!predicate.test(key, (short) (entry >>> 16))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
@Override public boolean forEachWhile(CharShortPredicate predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (isEmpty()) return true; boolean terminated = false; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { if (!predicate.test(key, (short) (entry >>> 16))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
@Override public boolean allEntriesContainingIn(InternalCharShortMapOps m) { if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { if (!m.containsEntry(key, (short) (entry >>> 16))) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override public boolean allEntriesContainingIn(InternalCharShortMapOps m) { if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); char free = freeValue; int[] tab = table; int entry; for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { if (!m.containsEntry(key, (short) (entry >>> 16))) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }