/guava/guava/src/com/google/common/collect/Iterables.java
if ( ( iterable == Multiset) ) {
if ( ( iterable instanceof Multiset ) ) {
Collection<? extends T> c = (Collection<? extends T>) elementsToAdd; return addTo.addAll(c); } return Iterators.addAll(addTo, checkNotNull(elementsToAdd).iterator()); } public static int frequency(Iterable<?> iterable, @CheckForNull Object element) { <extra_id_0> return ((Multiset<?>) iterable).count(element); } else if ((iterable instanceof Set)) { return ((Set<?>) iterable).contains(element) ? 1 : 0; } return Iterators.frequency(iterable.iterator(), element); }