@Override public void accept(char key, short value) { map.justPut(key, value); } });
@Override public void accept(char key, short value) { map.justPut(key, value); } });
@Override public void reversePutAllTo(InternalCharShortMapOps m) { if (this.isEmpty()) return; 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)); } } }
@Override public void reversePutAllTo(InternalCharShortMapOps m) { if (this.isEmpty()) return; 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)); } } }
@Override public void reversePutAllTo(InternalCharShortMapOps m) { if (this.isEmpty()) return; 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)); } } }
@Override public void reversePutAllTo(InternalCharShortMapOps m) { if (this.isEmpty()) return; 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)); } } }
@Override public void reversePutAllTo(InternalCharShortMapOps m) { if (this.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 (this.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 (this.isEmpty()) return; int mc = modCount(); char free = freeValue; char removed = removedValue; int[] tab = table; int entry; if (noRemoved()) { for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { m.justPut(key, (short) (entry >>> 16)); } } } else { for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free && key != removed) { m.justPut(key, (short) (entry >>> 16)); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalCharShortMapOps m) { if (this.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 (this.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 (this.isEmpty()) return; int mc = modCount(); char free = freeValue; char removed = removedValue; int[] tab = table; int entry; if (noRemoved()) { for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free) { m.justPut(key, (short) (entry >>> 16)); } } } else { for (int i = tab.length - 1; i >= 0; i--) { char key; if ((key = (char) (entry = tab[i])) != free && key != removed) { m.justPut(key, (short) (entry >>> 16)); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalCharShortMapOps m) { if (this.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 (this.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(); }
public static void putAll(final InternalCharShortMapOps map, Map<? extends Character, ? extends Short> another) { if (map == another) throw new IllegalArgumentException(); long maxPossibleSize = map.sizeAsLong() + Containers.sizeAsLong(another); map.ensureCapacity(maxPossibleSize); if (another instanceof CharShortMap) { if (another instanceof InternalCharShortMapOps) { ((InternalCharShortMapOps) another).reversePutAllTo(map); } else { ((CharShortMap) another).forEach(new CharShortConsumer() { @Override public void accept(char key, short value) { map.justPut(key, value); } }); } } else { for (Map.Entry<? extends Character, ? extends Short> e : another.entrySet()) { map.justPut(e.getKey(), e.getValue()); } } }
public static void putAll(final InternalCharShortMapOps map, Map<? extends Character, ? extends Short> another) { if (map == another) throw new IllegalArgumentException(); long maxPossibleSize = map.sizeAsLong() + Containers.sizeAsLong(another); map.ensureCapacity(maxPossibleSize); if (another instanceof CharShortMap) { if (another instanceof InternalCharShortMapOps) { ((InternalCharShortMapOps) another).reversePutAllTo(map); } else { ((CharShortMap) another).forEach(new CharShortConsumer() { @Override public void accept(char key, short value) { map.justPut(key, value); } }); } } else { for (Map.Entry<? extends Character, ? extends Short> e : another.entrySet()) { map.justPut(e.getKey(), e.getValue()); } } }