@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return MutableQHashSeparateKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return MutableQHashSeparateKVCharKeyMap.this.removeAll(this, c); }
public static boolean addAll(final CharCollection collection, Collection<? extends Character> another) { if (collection == another) throw new IllegalArgumentException(); long maxPossibleSize = collection.sizeAsLong() + Containers.sizeAsLong(another); collection.ensureCapacity(maxPossibleSize); if (another instanceof CharCollection) { if (another instanceof InternalCharCollectionOps) { return ((InternalCharCollectionOps) another).reverseAddAllTo(collection); } else { class AddAll implements CharConsumer { boolean collectionChanged = false; @Override public void accept(char value) { collectionChanged |= collection.add(value); } } AddAll addAll = new AddAll(); ((CharCollection) another).forEach(addAll); return addAll.collectionChanged; } } else { boolean collectionChanged = false; for (Character v : another) { collectionChanged |= collection.add(v.charValue()); } return collectionChanged; } }
public static boolean containsAll(final CharCollection collection, Collection<?> another) { if (collection == another) return true; if (another instanceof CharCollection) { CharCollection c2 = (CharCollection) another; if (collection instanceof CharSet && c2 instanceof CharSet && collection.size() < another.size()) { return false; } if (c2 instanceof InternalCharCollectionOps) { // noinspection unchecked return ((InternalCharCollectionOps) c2).allContainingIn(collection); } return c2.forEachWhile(new CharPredicate() { @Override public boolean test(char value) { return collection.contains(value); } }); } else { for (Object o : another) { if (!collection.contains(((Character) o).charValue() )) return false; } return true; } }
public static boolean addAll(final CharCollection collection, Collection<? extends Character> another) { if (collection == another) throw new IllegalArgumentException(); long maxPossibleSize = collection.sizeAsLong() + Containers.sizeAsLong(another); collection.ensureCapacity(maxPossibleSize); if (another instanceof CharCollection) { if (another instanceof InternalCharCollectionOps) { return ((InternalCharCollectionOps) another).reverseAddAllTo(collection); } else { class AddAll implements CharConsumer { boolean collectionChanged = false; @Override public void accept(char value) { collectionChanged |= collection.add(value); } } AddAll addAll = new AddAll(); ((CharCollection) another).forEach(addAll); return addAll.collectionChanged; } } else { boolean collectionChanged = false; for (Character v : another) { collectionChanged |= collection.add(v.charValue()); } return collectionChanged; } }
public static boolean containsAll(final CharCollection collection, Collection<?> another) { if (collection == another) return true; if (another instanceof CharCollection) { CharCollection c2 = (CharCollection) another; if (collection instanceof CharSet && c2 instanceof CharSet && collection.size() < another.size()) { return false; } if (c2 instanceof InternalCharCollectionOps) { // noinspection unchecked return ((InternalCharCollectionOps) c2).allContainingIn(collection); } return c2.forEachWhile(new CharPredicate() { @Override public boolean test(char value) { return collection.contains(value); } }); } else { for (Object o : another) { if (!collection.contains(((Character) o).charValue() )) return false; } return true; } }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return MutableLHashSeparateKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return MutableLHashSeparateKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return ImmutableQHashParallelKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return ImmutableQHashParallelKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return UpdatableQHashSeparateKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return UpdatableQHashSeparateKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return ImmutableQHashSeparateKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return ImmutableQHashSeparateKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return MutableLHashSeparateKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return MutableLHashSeparateKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return ImmutableQHashSeparateKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return ImmutableQHashSeparateKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return UpdatableLHashParallelKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return UpdatableLHashParallelKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return ImmutableQHashParallelKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return ImmutableQHashParallelKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return ImmutableLHashParallelKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return ImmutableLHashParallelKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return MutableQHashParallelKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return MutableQHashParallelKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return UpdatableLHashSeparateKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return UpdatableLHashSeparateKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return MutableLHashParallelKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return MutableLHashParallelKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return MutableQHashParallelKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return MutableQHashParallelKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return UpdatableQHashSeparateKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return UpdatableQHashSeparateKVCharKeyMap.this.removeAll(this, c); }
@Override public boolean removeAll(@Nonnull Collection<?> c) { if (c instanceof CharCollection) { if (c instanceof InternalCharCollectionOps) { InternalCharCollectionOps c2 = (InternalCharCollectionOps) c; if (c2.size() < this.size()) { return c2.reverseRemoveAllFrom(this); } } return ImmutableLHashParallelKVCharKeyMap.this.removeAll(this, (CharCollection) c); } return ImmutableLHashParallelKVCharKeyMap.this.removeAll(this, c); }