/* (non-Javadoc)
@see java.util.Collection#retainAll(java.util.Collection)
769504
@Override
    public final boolean retainAll(Collection<?> c) {
        this.writeLock.lock();
        try {
            int newSize = 0;
            for (final Queue<T> queue : this.keyedQueues.values()) {
                queue.retainAll(c);
                newSize += queue.size();
            }

            // Update the queue size
            final int oldSize = this.size;
            this.size = newSize;

            // If the updated size and old size differ things changed
            return this.size != oldSize;
        } finally {
            this.writeLock.unlock();
        }
    }
127681
public boolean addAll(Collection<T> items)
	{
		boolean wasAllAdded = true;
		for (T item : items)
		{
			if(!add(item))
				wasAllAdded = false;
		}
		
		return wasAllAdded;
	}
1200419
public void setIfexistsall(String elementList) {

        if (elementList != null) {
            m_elementList = elementList;
            m_checkall = true;
            m_checknone = false;
        }
    }
1205153
@Override
	public boolean removeAll(Collection<?> c) {
		boolean b = queue.removeAll(c);
		if (b){
			signalSizeReduced();
		}
		return b;
	}
156900
@SuppressWarnings("unchecked")
    public static <E, T extends E> Collection<E> removeAll(Collection<E> c, T... array){
        for(T obj: array)
            c.remove(obj);
        return c;
    }
245869
synchronized Collection<KeyValue> getAll(long index) {
        incrementLastAppliedIndex(index);

        Collection<KeyValue> copiedEntries = Lists.newArrayListWithCapacity(entries.size());
        for (Map.Entry<String, String> entry : entries.entrySet()) {
            copiedEntries.add(new KeyValue(entry.getKey(), entry.getValue()));
        }

        return copiedEntries;
    }
182019
@Override
    public Iterable<Object> loadAllKeys() {
        if (isMapLoader()) {
            Iterable<Object> allKeys;
            try {
                allKeys = mapLoader.loadAllKeys();
            } catch (AbstractMethodError e) {
                // Invoke reflectively to preserve backwards binary compatibility. Removable in v4.x
                allKeys = ReflectionHelper.invokeMethod(mapLoader, "loadAllKeys");
            }
            return allKeys;
        }
        return null;
    }
794793
@Override
    public final boolean containsAll(final Collection<? extends E> collection) {
        for(E element : collection) {
            if(!this.contains(element)) {
                return false;
            }
        }
        return true;
    }
154317
public void reclaimAll ()
    {
        // make sure any bound sources are released
        for (PooledSource pooled : _sources) {
            if (pooled.holder != null) {
                pooled.holder.stop();
                pooled.holder.reclaim();
                pooled.holder = null;
            }
        }
    }
1360070
public void releaseAll() {
        synchronized(this) {
            Object[] refSet = allocatedMemoryReferences.values().toArray();
            if(refSet.length != 0) {
                logger.finer("Releasing allocated memory regions");
            }
            for(Object ref : refSet) {
                release((MemoryReference) ref);
            }
        }
    }
379179
@Override
	public void putAll(final Map<? extends Object, ? extends Object> t) {
		lock.writeLock().lock();
		try {
			properties.putAll(t);
		} finally {
			lock.writeLock().unlock();
		}
	}
552723
@Override
    public void putAll(Map<? extends K, ? extends V> in) {
        if (fast) {
            synchronized (this) {
                Map<K, V> temp = cloneMap(map);
                temp.putAll(in);
                map = temp;
            }
        } else {
            synchronized (map) {
                map.putAll(in);
            }
        }
    }
1344623
private Iterable<String> retainExistingRoles(final Collection<String> roles) {
        final List<String> existingRoles = getRoles();
        existingRoles.retainAll(roles);
        return existingRoles;
    }
35549
private Object retainAll(Schema schema, MarkSet markSet, ProtoType type, Object o) {
    if (!markSet.contains(type)) {
      return null; // Prune this type.

    } else if (o instanceof Map) {
      ImmutableMap.Builder<ProtoMember, Object> builder = ImmutableMap.builder();
      for (Map.Entry<?, ?> entry : ((Map<?, ?>) o).entrySet()) {
        ProtoMember protoMember = (ProtoMember) entry.getKey();
        if (!markSet.contains(protoMember)) continue; // Prune this field.
        Field field = schema.getField(protoMember);
        Object retainedValue = retainAll(schema, markSet, field.type(), entry.getValue());
        if (retainedValue != null) {
          builder.put(protoMember, retainedValue); // This retained field is non-empty.
        }
      }
      ImmutableMap<ProtoMember, Object> map = builder.build();
      return !map.isEmpty() ? map : null;

    } else if (o instanceof List) {
      ImmutableList.Builder<Object> builder = ImmutableList.builder();
      for (Object value : ((List) o)) {
        Object retainedValue = retainAll(schema, markSet, type, value);
        if (retainedValue != null) {
          builder.add(retainedValue); // This retained value is non-empty.
        }
      }
      ImmutableList<Object> list = builder.build();
      return !list.isEmpty() ? list : null;

    } else {
      return o;
    }
  }
227347
@Override
   public boolean retainAll(Collection<?> c) {
      boolean modified = false;
      try (CloseableIterator<O> it = iterator()) {
         while (it.hasNext()) {
            if (!c.contains(it.next())) {
               it.remove();
               modified = true;
            }
         }
         return modified;
      }
   }
773910
public Table retainColumns(Column<?>... columns) {
        List<Column<?>> retained = Arrays.asList(columns);
        columnList.clear();
        columnList.addAll(retained);
        return this;
    }
1047919
public static DescriptorExtensionList<RetentionStrategy<?>,Descriptor<RetentionStrategy<?>>> all() {
        return (DescriptorExtensionList) Jenkins.get().getDescriptorList(RetentionStrategy.class);
    }