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