@Override public void forEach(BiConsumer<? super K, ? super V> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE) { action.accept(key, (V) tab[i + 1]); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE && key != REMOVED) { action.accept(key, (V) tab[i + 1]); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void replaceAll( BiFunction<? super K, ? super V, ? extends V> function) { if (function == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE) { tab[i + 1] = function.apply(key, (V) tab[i + 1]); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE && key != REMOVED) { tab[i + 1] = function.apply(key, (V) tab[i + 1]); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Nonnull @Override public ObjObjCursor<K, V> cursor() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedMapCursor(mc); return new NoRemovedMapCursor(mc); }
@Nonnull @Override public ObjObjCursor<K, V> cursor() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedMapCursor(mc); return new NoRemovedMapCursor(mc); }
@Override public void forEach(BiConsumer<? super K, ? super V> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE) { action.accept(key, (V) tab[i + 1]); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE && key != REMOVED) { action.accept(key, (V) tab[i + 1]); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalObjObjMapOps<? super K, ? super V> m) { if (isEmpty()) return; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE) { m.justPut(key, (V) tab[i + 1]); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE && key != REMOVED) { m.justPut(key, (V) tab[i + 1]); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalObjObjMapOps<? super K, ? super V> m) { if (isEmpty()) return; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE) { m.justPut(key, (V) tab[i + 1]); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE && key != REMOVED) { m.justPut(key, (V) tab[i + 1]); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public ObjIterator<K> iterator() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedKeyIterator(mc); return new NoRemovedKeyIterator(mc); }
@Override public ObjCursor<K> setCursor() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedKeyCursor(mc); return new NoRemovedKeyCursor(mc); }
@Override public ObjCursor<K> setCursor() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedKeyCursor(mc); return new NoRemovedKeyCursor(mc); }
@Override public ObjIterator<K> iterator() { int mc = modCount(); if (!noRemoved()) return new SomeRemovedKeyIterator(mc); return new NoRemovedKeyIterator(mc); }
@Override public int hashCode() { int hashCode = 0; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE) { hashCode += nullableKeyHashCode(key) ^ nullableValueHashCode((V) tab[i + 1]); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE && key != REMOVED) { hashCode += nullableKeyHashCode(key) ^ nullableValueHashCode((V) tab[i + 1]); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }
@Override public int hashCode() { int hashCode = 0; int mc = modCount(); Object[] tab = table; if (noRemoved()) { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE) { hashCode += nullableKeyHashCode(key) ^ nullableValueHashCode((V) tab[i + 1]); } } } else { for (int i = tab.length - 2; i >= 0; i -= 2) { K key; // noinspection unchecked if ((key = (K) (K) tab[i]) != FREE && key != REMOVED) { hashCode += nullableKeyHashCode(key) ^ nullableValueHashCode((V) tab[i + 1]); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }