@Override public int hashCode() { int hashCode = 0; int mc = modCount(); Object[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { hashCode += nullableKeyHashCode(key) ^ vals[i]; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }
@Override public int hashCode() { int hashCode = 0; int mc = modCount(); Object[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { hashCode += nullableKeyHashCode(key) ^ vals[i]; } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return hashCode; }
@Nonnull @Override public ObjCharCursor<K> cursor() { int mc = modCount(); return new NoRemovedMapCursor(mc); }
@Override public void forEach(BiConsumer<? super K, ? super Character> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { action.accept(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Nonnull @Override public ObjCharCursor<K> cursor() { int mc = modCount(); return new NoRemovedMapCursor(mc); }
@Override public void reversePutAllTo(InternalObjCharMapOps<? super K> m) { if (isEmpty()) return; int mc = modCount(); Object[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { m.justPut(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void reversePutAllTo(InternalObjCharMapOps<? super K> m) { if (isEmpty()) return; int mc = modCount(); Object[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { m.justPut(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void replaceAll( BiFunction<? super K, ? super Character, ? extends Character> function) { if (function == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { vals[i] = function.apply(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void replaceAll(ObjCharToCharFunction<? super K> function) { if (function == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { vals[i] = function.applyAsChar(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void replaceAll(ObjCharToCharFunction<? super K> function) { if (function == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { vals[i] = function.applyAsChar(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void forEach(ObjCharConsumer<? super K> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { action.accept(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(BiConsumer<? super K, ? super Character> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { action.accept(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void forEach(ObjCharConsumer<? super K> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { action.accept(key, vals[i]); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public boolean forEachWhile(ObjCharPredicate<? super K> predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (isEmpty()) return true; boolean terminated = false; int mc = modCount(); Object[] keys = set; char[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { if (!predicate.test(key, vals[i])) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }