- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for fromNullable (0.07 sec)
-
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 15 22:32:14 UTC 2024 - 3.9K bytes - Viewed (0)