Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for safeGet (0.07 sec)

  1. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

    import static com.google.common.collect.CollectPreconditions.checkNonnegative;
    import static com.google.common.collect.Lists.newArrayListWithExpectedSize;
    import static com.google.common.collect.Maps.safeGet;
    import static java.lang.Math.max;
    import static java.util.Objects.requireNonNull;
    
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/AbstractMapBasedMultiset.java

    import static com.google.common.collect.CollectPreconditions.checkNonnegative;
    import static com.google.common.collect.CollectPreconditions.checkRemove;
    import static com.google.common.collect.Maps.safeGet;
    import static java.util.Objects.requireNonNull;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  3. 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) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 86.3K bytes
    - Viewed (0)
  4. 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;
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 161.6K bytes
    - Viewed (0)
  5. 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;
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 167.4K bytes
    - Viewed (0)
Back to top