@Override public boolean test(double a, byte b) { return map.containsEntry(a, b); } });
@Override public boolean test(double a, byte b) { return map.containsEntry(a, b); } });
@Override public boolean allEntriesContainingIn(InternalDoubleByteMapOps m) { if (this.isEmpty()) return true; boolean containsAll = true; long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } return containsAll; }
@Override public boolean allEntriesContainingIn(InternalDoubleByteMapOps m) { if (this.isEmpty()) return true; boolean containsAll = true; long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } return containsAll; }
@Override public boolean allEntriesContainingIn(InternalDoubleByteMapOps m) { if (this.isEmpty()) return true; boolean containsAll = true; long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } return containsAll; }
@Override public boolean allEntriesContainingIn(InternalDoubleByteMapOps m) { if (this.isEmpty()) return true; boolean containsAll = true; long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } return containsAll; }
@Override public boolean allEntriesContainingIn(InternalDoubleByteMapOps m) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override public boolean allEntriesContainingIn(InternalDoubleByteMapOps m) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
public static boolean containsAllEntries(final InternalDoubleByteMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof DoubleByteMap) { DoubleByteMap m2 = (DoubleByteMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalDoubleByteMapOps) { //noinspection unchecked return ((InternalDoubleByteMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new DoubleBytePredicate() { @Override public boolean test(double a, byte b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Double) e.getKey(), (Byte) e.getValue())) return false; } return true; }
@Override public boolean allEntriesContainingIn(InternalDoubleByteMapOps m) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override public boolean allEntriesContainingIn(InternalDoubleByteMapOps m) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override public boolean allEntriesContainingIn(InternalDoubleByteMapOps m) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
public static boolean containsAllEntries(final InternalDoubleByteMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof DoubleByteMap) { DoubleByteMap m2 = (DoubleByteMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalDoubleByteMapOps) { //noinspection unchecked return ((InternalDoubleByteMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new DoubleBytePredicate() { @Override public boolean test(double a, byte b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Double) e.getKey(), (Byte) e.getValue())) return false; } return true; }
@Override public boolean allEntriesContainingIn(InternalDoubleByteMapOps m) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override public boolean allEntriesContainingIn(InternalDoubleByteMapOps m) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }
@Override public boolean allEntriesContainingIn(InternalDoubleByteMapOps m) { if (this.isEmpty()) return true; boolean containsAll = true; int mc = modCount(); long[] keys = set; byte[] vals = values; for (int i = keys.length - 1; i >= 0; i--) { long key; if ((key = keys[i]) < FREE_BITS) { if (!m.containsEntry(key, vals[i])) { containsAll = false; break; } } } if (mc != modCount()) throw new java.util.ConcurrentModificationException(); return containsAll; }