- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for getEnumIfPresent (0.11 sec)
-
guava/src/com/google/common/base/Enums.java
* * @since 12.0 */ public static <T extends Enum<T>> Optional<T> getIfPresent(Class<T> enumClass, String value) { checkNotNull(enumClass); checkNotNull(value); return Platform.getEnumIfPresent(enumClass, value); } @GwtIncompatible // java.lang.ref.WeakReference private static final Map<Class<? extends Enum<?>>, Map<String, WeakReference<? extends Enum<?>>>> enumConstantCache = new WeakHashMap<>();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 26 11:56:44 UTC 2023 - 5K bytes - Viewed (0) -
guava/src/com/google/common/base/Platform.java
private Platform() {} static CharMatcher precomputeCharMatcher(CharMatcher matcher) { return matcher.precomputedInternal(); } 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
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 15 22:32:14 UTC 2024 - 3.9K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Enums.java
* * @since 12.0 */ public static <T extends Enum<T>> Optional<T> getIfPresent(Class<T> enumClass, String value) { checkNotNull(enumClass); checkNotNull(value); return Platform.getEnumIfPresent(enumClass, value); } @GwtIncompatible // java.lang.ref.WeakReference private static final Map<Class<? extends Enum<?>>, Map<String, WeakReference<? extends Enum<?>>>> enumConstantCache = new WeakHashMap<>();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 26 11:56:44 UTC 2023 - 5K bytes - Viewed (0)