@Override public void replaceAll( BiFunction<? super K, ? super Double, ? extends Double> function) { if (function == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { vals[i] = Double.doubleToLongBits(function.apply(key, Double.longBitsToDouble(vals[i]))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void forEach(BiConsumer<? super K, ? super Double> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { action.accept(key, Double.longBitsToDouble(vals[i])); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void replaceAll(ObjDoubleToDoubleFunction<? super K> function) { if (function == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { vals[i] = Double.doubleToLongBits(function.applyAsDouble(key, Double.longBitsToDouble(vals[i]))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void replaceAll(ObjDoubleToDoubleFunction<? super K> function) { if (function == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { vals[i] = Double.doubleToLongBits(function.applyAsDouble(key, Double.longBitsToDouble(vals[i]))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void forEach(ObjDoubleConsumer<? super K> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { action.accept(key, Double.longBitsToDouble(vals[i])); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void replaceAll( BiFunction<? super K, ? super Double, ? extends Double> function) { if (function == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { vals[i] = Double.doubleToLongBits(function.apply(key, Double.longBitsToDouble(vals[i]))); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
public void forEach(BiConsumer<? super K, ? super Double> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { action.accept(key, Double.longBitsToDouble(vals[i])); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public void forEach(ObjDoubleConsumer<? super K> action) { if (action == null) throw new java.lang.NullPointerException(); if (isEmpty()) return; int mc = modCount(); Object[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { action.accept(key, Double.longBitsToDouble(vals[i])); } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); }
@Override public String toString() { if (isEmpty()) return "{}"; StringBuilder sb = new StringBuilder(); int elementCount = 0; int mc = modCount(); Object[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { sb.append(' '); sb.append(key != this ? key : "(this Map)"); sb.append('='); sb.append(Double.longBitsToDouble(vals[i])); sb.append(','); if (++elementCount == 8) { int expectedLength = sb.length() * (size() / 8); sb.ensureCapacity(expectedLength + (expectedLength / 2)); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); sb.setCharAt(0, '{'); sb.setCharAt(sb.length() - 1, '}'); return sb.toString(); }
@Override public String toString() { if (isEmpty()) return "{}"; StringBuilder sb = new StringBuilder(); int elementCount = 0; int mc = modCount(); Object[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { sb.append(' '); sb.append(key != this ? key : "(this Map)"); sb.append('='); sb.append(Double.longBitsToDouble(vals[i])); sb.append(','); if (++elementCount == 8) { int expectedLength = sb.length() * (size() / 8); sb.ensureCapacity(expectedLength + (expectedLength / 2)); } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); sb.setCharAt(0, '{'); sb.setCharAt(sb.length() - 1, '}'); return sb.toString(); }
@Override public boolean forEachWhile(ObjDoublePredicate<? super K> predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (isEmpty()) return true; boolean terminated = false; int mc = modCount(); Object[] keys = set; long[] 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, Double.longBitsToDouble(vals[i]))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
@Override public boolean forEachWhile(ObjDoublePredicate<? super K> predicate) { if (predicate == null) throw new java.lang.NullPointerException(); if (isEmpty()) return true; boolean terminated = false; int mc = modCount(); Object[] keys = set; long[] 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, Double.longBitsToDouble(vals[i]))) { terminated = true; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return !terminated; }
@Override public void reversePutAllTo(InternalObjDoubleMapOps<? super K> m) { if (isEmpty()) return; int mc = modCount(); Object[] keys = set; long[] 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(InternalObjDoubleMapOps<? super K> m) { if (isEmpty()) return; int mc = modCount(); Object[] keys = set; long[] 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 boolean allEntriesContainingIn(InternalObjDoubleMapOps<?> m) { if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); Object[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override public boolean allEntriesContainingIn(InternalObjDoubleMapOps<?> m) { if (isEmpty()) return true; boolean containsAll = true; int mc = modCount(); Object[] keys = set; long[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { K key; // noinspection unchecked if ((key = (K) keys[i]) != FREE) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }