@Override public void accept(int key, char value) { map.justPut(key, value); } });
@Override public void accept(int key, char value) { map.justPut(key, value); } });
@Override public void reversePutAllTo(InternalIntCharMapOps m) { if (this.isEmpty()) return; int free = freeValue; int[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { m.justPut(key, vals[i]); } } }
@Override public void reversePutAllTo(InternalIntCharMapOps m) { if (this.isEmpty()) return; int free = freeValue; int[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { m.justPut(key, vals[i]); } } }
@Override public void reversePutAllTo(InternalIntCharMapOps m) { if (this.isEmpty()) return; int free = freeValue; int[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { m.justPut(key, vals[i]); } } }
@Override public void reversePutAllTo(InternalIntCharMapOps m) { if (this.isEmpty()) return; int free = freeValue; int[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { m.justPut(key, vals[i]); } } }
@Override public void reversePutAllTo(InternalIntCharMapOps m) { if (this.isEmpty()) return; int mc = modCount(); int free = freeValue; int removed = removedValue; int[] keys = set; char[] vals = values; if (noRemoved()) { for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { m.justPut(key, vals[i]); } } } else { for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free && key != removed) { m.justPut(key, vals[i]); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalIntCharMapOps m) { if (this.isEmpty()) return; int mc = modCount(); int free = freeValue; int removed = removedValue; int[] keys = set; char[] vals = values; if (noRemoved()) { for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { m.justPut(key, vals[i]); } } } else { for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free && key != removed) { m.justPut(key, vals[i]); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalIntCharMapOps m) { if (this.isEmpty()) return; int mc = modCount(); int free = freeValue; int[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { m.justPut(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalIntCharMapOps m) { if (this.isEmpty()) return; int mc = modCount(); int free = freeValue; int[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { m.justPut(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalIntCharMapOps m) { if (this.isEmpty()) return; int mc = modCount(); int free = freeValue; int[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { m.justPut(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalIntCharMapOps m) { if (this.isEmpty()) return; int mc = modCount(); int free = freeValue; int[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { m.justPut(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalIntCharMapOps m) { if (this.isEmpty()) return; int mc = modCount(); int free = freeValue; int[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { m.justPut(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalIntCharMapOps m) { if (this.isEmpty()) return; int mc = modCount(); int free = freeValue; int[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { int key; if ((key = keys[i]) != free) { m.justPut(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public static void putAll(final InternalIntCharMapOps map, Map<? extends Integer, ? extends Character> another) { if (map == another) throw new IllegalArgumentException(); long maxPossibleSize = map.sizeAsLong() + Containers.sizeAsLong(another); map.ensureCapacity(maxPossibleSize); if (another instanceof IntCharMap) { if (another instanceof InternalIntCharMapOps) { ((InternalIntCharMapOps) another).reversePutAllTo(map); } else { ((IntCharMap) another).forEach(new IntCharConsumer() { @Override public void accept(int key, char value) { map.justPut(key, value); } }); } } else { for (Map.Entry<? extends Integer, ? extends Character> e : another.entrySet()) { map.justPut(e.getKey(), e.getValue()); } } }
public static void putAll(final InternalIntCharMapOps map, Map<? extends Integer, ? extends Character> another) { if (map == another) throw new IllegalArgumentException(); long maxPossibleSize = map.sizeAsLong() + Containers.sizeAsLong(another); map.ensureCapacity(maxPossibleSize); if (another instanceof IntCharMap) { if (another instanceof InternalIntCharMapOps) { ((InternalIntCharMapOps) another).reversePutAllTo(map); } else { ((IntCharMap) another).forEach(new IntCharConsumer() { @Override public void accept(int key, char value) { map.justPut(key, value); } }); } } else { for (Map.Entry<? extends Integer, ? extends Character> e : another.entrySet()) { map.justPut(e.getKey(), e.getValue()); } } }