/** * Returns {@code true} if {@code iterable} contains any object for which {@code equals(element)} * is true. */ public static boolean contains(Iterable<?> iterable, @Nullable Object element) { if (iterable instanceof Collection) { Collection<?> collection = (Collection<?>) iterable; return Collections2.safeContains(collection, element); } return Iterators.contains(iterable.iterator(), element); }
public boolean containsValue(Object paramObject) { if (paramObject == null) return false; return Iterators.contains(valueIterator(), paramObject); }
protected boolean standardContains(@Nullable Object var1) { return Iterators.contains(this.iterator(), var1); }
/** * A sensible definition of {@link #contains} in terms of {@link #iterator}. If you override * {@link #iterator}, you may wish to override {@link #contains} to forward to this * implementation. * * @since 7.0 */ protected boolean standardContains(@Nullable Object object) { return Iterators.contains(iterator(), object); }