- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for safeGet (0.14 sec)
-
android/guava/src/com/google/common/collect/Multimaps.java
public Iterator<K> iterator() { return Maps.keyIterator(multimap.entries().iterator()); } @Override public int count(@CheckForNull Object element) { Collection<V> values = Maps.safeGet(multimap.asMap(), element); return (values == null) ? 0 : values.size(); } @Override public int remove(@CheckForNull Object element, int occurrences) {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed May 01 18:44:57 GMT 2024 - 86.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Maps.java
} /** * Delegates to {@link Map#get}. Returns {@code null} on {@code ClassCastException} and {@code * NullPointerException}. */ @CheckForNull static <V extends @Nullable Object> V safeGet(Map<?, V> map, @CheckForNull Object key) { checkNotNull(map); try { return map.get(key); } catch (ClassCastException | NullPointerException e) { return null; } }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed May 01 18:44:57 GMT 2024 - 159.6K bytes - Viewed (0)