- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for safeContains (0.13 sec)
-
guava/src/com/google/common/collect/Collections2.java
} /** * Delegates to {@link Collection#contains}. Returns {@code false} if the {@code contains} method * throws a {@code ClassCastException} or {@code NullPointerException}. */ static boolean safeContains(Collection<?> collection, @CheckForNull Object object) { checkNotNull(collection); try { return collection.contains(object); } catch (ClassCastException | NullPointerException e) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 23.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Collections2.java
} /** * Delegates to {@link Collection#contains}. Returns {@code false} if the {@code contains} method * throws a {@code ClassCastException} or {@code NullPointerException}. */ static boolean safeContains(Collection<?> collection, @CheckForNull Object object) { checkNotNull(collection); try { return collection.contains(object); } catch (ClassCastException | NullPointerException e) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 22.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java
@Override protected Set<E> delegate() { return delegate; } @Override public boolean contains(@CheckForNull Object object) { return object != null && Collections2.safeContains(delegate, object); } @Override public boolean containsAll(Collection<?> collection) { return standardContainsAll(collection); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 21.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Iterables.java
Iterable<? extends @Nullable Object> iterable, @CheckForNull Object element) { if (iterable instanceof Collection) { Collection<?> collection = (Collection<?>) iterable; return Collections2.safeContains(collection, element); } return Iterators.contains(iterable.iterator(), element); } /** * Removes, from an iterable, every element that belongs to the provided collection. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 24 19:38:27 UTC 2024 - 42.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Maps.java
public boolean containsKey(@CheckForNull Object key) { return backingSet().contains(key); } @Override @CheckForNull public V get(@CheckForNull Object key) { if (Collections2.safeContains(backingSet(), key)) { @SuppressWarnings("unchecked") // unsafe, but Javadoc warns about it K k = (K) key; return function.apply(k); } else { return null; } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 161.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/Maps.java
return getOrDefault(key, null); } @Override @CheckForNull public V getOrDefault(@CheckForNull Object key, @CheckForNull V defaultValue) { if (Collections2.safeContains(backingSet(), key)) { @SuppressWarnings("unchecked") // unsafe, but Javadoc warns about it K k = (K) key; return function.apply(k); } else { return defaultValue; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 167.4K bytes - Viewed (0)