public static boolean containsAllEntries(final InternalCharCharMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof CharCharMap) { CharCharMap m2 = (CharCharMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalCharCharMapOps) { //noinspection unchecked return ((InternalCharCharMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new CharCharPredicate() { @Override public boolean test(char a, char b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Character) e.getKey(), (Character) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalFloatShortMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof FloatShortMap) { FloatShortMap m2 = (FloatShortMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalFloatShortMapOps) { //noinspection unchecked return ((InternalFloatShortMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new FloatShortPredicate() { @Override public boolean test(float a, short b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Float) e.getKey(), (Short) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalShortIntMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof ShortIntMap) { ShortIntMap m2 = (ShortIntMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalShortIntMapOps) { //noinspection unchecked return ((InternalShortIntMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new ShortIntPredicate() { @Override public boolean test(short a, int b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Short) e.getKey(), (Integer) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalDoubleDoubleMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof DoubleDoubleMap) { DoubleDoubleMap m2 = (DoubleDoubleMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalDoubleDoubleMapOps) { //noinspection unchecked return ((InternalDoubleDoubleMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new DoubleDoublePredicate() { @Override public boolean test(double a, double b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Double) e.getKey(), (Double) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalFloatByteMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof FloatByteMap) { FloatByteMap m2 = (FloatByteMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalFloatByteMapOps) { //noinspection unchecked return ((InternalFloatByteMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new FloatBytePredicate() { @Override public boolean test(float a, byte b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Float) e.getKey(), (Byte) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalCharShortMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof CharShortMap) { CharShortMap m2 = (CharShortMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalCharShortMapOps) { //noinspection unchecked return ((InternalCharShortMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new CharShortPredicate() { @Override public boolean test(char a, short b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Character) e.getKey(), (Short) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalFloatLongMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof FloatLongMap) { FloatLongMap m2 = (FloatLongMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalFloatLongMapOps) { //noinspection unchecked return ((InternalFloatLongMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new FloatLongPredicate() { @Override public boolean test(float a, long b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Float) e.getKey(), (Long) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalShortLongMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof ShortLongMap) { ShortLongMap m2 = (ShortLongMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalShortLongMapOps) { //noinspection unchecked return ((InternalShortLongMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new ShortLongPredicate() { @Override public boolean test(short a, long b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Short) e.getKey(), (Long) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalFloatFloatMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof FloatFloatMap) { FloatFloatMap m2 = (FloatFloatMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalFloatFloatMapOps) { //noinspection unchecked return ((InternalFloatFloatMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new FloatFloatPredicate() { @Override public boolean test(float a, float b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Float) e.getKey(), (Float) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalShortCharMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof ShortCharMap) { ShortCharMap m2 = (ShortCharMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalShortCharMapOps) { //noinspection unchecked return ((InternalShortCharMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new ShortCharPredicate() { @Override public boolean test(short a, char b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Short) e.getKey(), (Character) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalDoubleLongMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof DoubleLongMap) { DoubleLongMap m2 = (DoubleLongMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalDoubleLongMapOps) { //noinspection unchecked return ((InternalDoubleLongMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new DoubleLongPredicate() { @Override public boolean test(double a, long b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Double) e.getKey(), (Long) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalDoubleFloatMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof DoubleFloatMap) { DoubleFloatMap m2 = (DoubleFloatMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalDoubleFloatMapOps) { //noinspection unchecked return ((InternalDoubleFloatMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new DoubleFloatPredicate() { @Override public boolean test(double a, float b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Double) e.getKey(), (Float) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalShortShortMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof ShortShortMap) { ShortShortMap m2 = (ShortShortMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalShortShortMapOps) { //noinspection unchecked return ((InternalShortShortMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new ShortShortPredicate() { @Override public boolean test(short a, short b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Short) e.getKey(), (Short) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalDoubleIntMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof DoubleIntMap) { DoubleIntMap m2 = (DoubleIntMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalDoubleIntMapOps) { //noinspection unchecked return ((InternalDoubleIntMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new DoubleIntPredicate() { @Override public boolean test(double a, int b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Double) e.getKey(), (Integer) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalByteCharMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof ByteCharMap) { ByteCharMap m2 = (ByteCharMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalByteCharMapOps) { //noinspection unchecked return ((InternalByteCharMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new ByteCharPredicate() { @Override public boolean test(byte a, char b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Byte) e.getKey(), (Character) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalCharDoubleMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof CharDoubleMap) { CharDoubleMap m2 = (CharDoubleMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalCharDoubleMapOps) { //noinspection unchecked return ((InternalCharDoubleMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new CharDoublePredicate() { @Override public boolean test(char a, double b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Character) e.getKey(), (Double) e.getValue())) return false; } return true; }
public static boolean containsAllEntries(final InternalLongFloatMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof LongFloatMap) { LongFloatMap m2 = (LongFloatMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalLongFloatMapOps) { //noinspection unchecked return ((InternalLongFloatMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new LongFloatPredicate() { @Override public boolean test(long a, float b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Long) e.getKey(), (Float) e.getValue())) return false; } return true; }
public static /*<>*/ void putAll(final InternalByteShortMapOps/*<>*/ map, Map<? extends Byte, ? extends Short> another) { if (map == another) throw new IllegalArgumentException(); long maxPossibleSize = map.sizeAsLong() + Containers.sizeAsLong(another); map.ensureCapacity(maxPossibleSize); if (another instanceof ByteShortMap) { if (another instanceof InternalByteShortMapOps) { ((InternalByteShortMapOps) another).reversePutAllTo(map); } else { ((ByteShortMap) another).forEach(new /*f*/ByteShortConsumer/*<>*/() { @Override public void accept(byte key, short value) { map.justPut(key, value); } }); } } else { for (Map.Entry<? extends Byte, ? extends Short> e : another.entrySet()) { map.justPut(e.getKey(), e.getValue()); } } }
public static boolean containsAllEntries(final InternalCharCharMapOps map, Map<?, ?> another) { if (map == another) throw new IllegalArgumentException(); if (another instanceof CharCharMap) { CharCharMap m2 = (CharCharMap) another; if (map.size() < m2.size()) return false; if (m2 instanceof InternalCharCharMapOps) { //noinspection unchecked return ((InternalCharCharMapOps) m2).allEntriesContainingIn(map); } return m2.forEachWhile(new CharCharPredicate() { @Override public boolean test(char a, char b) { return map.containsEntry(a, b); } }); } for (Map.Entry<?, ?> e : another.entrySet()) { if (!map.containsEntry((Character) e.getKey(), (Character) e.getValue())) return false; } return true; }
public static /*<>*/ void putAll(final InternalByteShortMapOps/*<>*/ map, Map<? extends Byte, ? extends Short> another) { if (map == another) throw new IllegalArgumentException(); long maxPossibleSize = map.sizeAsLong() + Containers.sizeAsLong(another); map.ensureCapacity(maxPossibleSize); if (another instanceof ByteShortMap) { if (another instanceof InternalByteShortMapOps) { ((InternalByteShortMapOps) another).reversePutAllTo(map); } else { ((ByteShortMap) another).forEach(new /*f*/ByteShortConsumer/*<>*/() { @Override public void accept(byte key, short value) { map.justPut(key, value); } }); } } else { for (Map.Entry<? extends Byte, ? extends Short> e : another.entrySet()) { map.justPut(e.getKey(), e.getValue()); } } }