Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for fromNullable (0.04 sec)

  1. android/guava/src/com/google/common/base/Platform.java

      }
    
      static <T extends Enum<T>> Optional<T> getEnumIfPresent(Class<T> enumClass, String value) {
        WeakReference<? extends Enum<?>> ref = Enums.getEnumConstants(enumClass).get(value);
        /*
         * We use `fromNullable` instead of `of` because `WeakReference.get()` has a nullable return
         * type.
         *
         * In practice, we are very unlikely to see `null`: The `WeakReference` to the enum constant
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/net/InternetDomainName.java

          if (i > 0
              && matchesType(
                  desiredType, Optional.fromNullable(PublicSuffixPatterns.UNDER.get(ancestorName)))) {
            return i - 1;
          }
    
          if (matchesType(
              desiredType, Optional.fromNullable(PublicSuffixPatterns.EXACT.get(ancestorName)))) {
            return i;
          }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 27.9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java

      private static final Function<Object, Optional<?>> NULLABLE_TO_OPTIONAL =
          new Function<Object, Optional<?>>() {
            @Override
            public Optional<?> apply(@Nullable Object obj) {
              return Optional.fromNullable(obj);
            }
          };
    
      private static final Function<Optional<?>, @Nullable Object> OPTIONAL_TO_NULLABLE =
          new Function<Optional<?>, @Nullable Object>() {
            @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 8.4K bytes
    - Viewed (0)
Back to top