Lines Matching refs:Collection
32 import java.util.Collection;
108 return (iterable instanceof Collection)
109 ? ((Collection<?>) iterable).size()
119 if (iterable instanceof Collection) {
120 Collection<?> collection = (Collection<?>) iterable;
136 * <p>This method calls {@link Collection#removeAll} if {@code iterable} is a
144 Iterable<?> removeFrom, Collection<?> elementsToRemove) {
145 return (removeFrom instanceof Collection)
146 ? ((Collection<?>) removeFrom).removeAll(checkNotNull(elementsToRemove))
154 * <p>This method calls {@link Collection#retainAll} if {@code iterable} is a
162 Iterable<?> removeFrom, Collection<?> elementsToRetain) {
163 return (removeFrom instanceof Collection)
164 ? ((Collection<?>) removeFrom).retainAll(checkNotNull(elementsToRetain))
293 Collection<? extends T> collection = toCollection(iterable);
314 private static <E> Collection<E> toCollection(Iterable<E> iterable) {
315 return (iterable instanceof Collection)
316 ? (Collection<E>) iterable
327 Collection<T> addTo, Iterable<? extends T> elementsToAdd) {
328 if (elementsToAdd instanceof Collection) {
329 Collection<? extends T> c = Collections2.cast(elementsToAdd);
699 * {@code Collection}, consider {@link Lists#transform} and {@link
728 if (iterable instanceof Collection) {
730 Collection<T> collection = (Collection<T>) iterable;
822 if (iterable instanceof Collection) {
823 Collection<T> collection = (Collection<T>) iterable;
1049 if (iterable instanceof Collection) {
1050 return ((Collection<?>) iterable).isEmpty();