Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for safeGet (0.14 sec)

  1. 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)
Back to top