- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for getEnumConstants (0.32 sec)
-
android/guava/src/com/google/common/base/Platform.java
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 * type. *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 4.1K bytes - Viewed (0) -
guava/src/com/google/common/collect/EnumMultiset.java
private transient long size; /** Creates an empty {@code EnumMultiset}. */ private EnumMultiset(Class<E> type) { this.type = type; checkArgument(type.isEnum()); this.enumConstants = type.getEnumConstants(); this.counts = new int[enumConstants.length]; } private boolean isActuallyE(@Nullable Object o) { if (o instanceof Enum) { Enum<?> e = (Enum<?>) o; int index = e.ordinal();
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 9.3K bytes - Viewed (0) -
guava/src/com/google/common/base/Enums.java
} enumConstantCache.put(enumClass, result); return result; } static <T extends Enum<T>> Map<String, WeakReference<? extends Enum<?>>> getEnumConstants( Class<T> enumClass) { synchronized (enumConstantCache) { Map<String, WeakReference<? extends Enum<?>>> constants = enumConstantCache.get(enumClass); if (constants == null) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue Jul 01 13:41:58 UTC 2025 - 4.8K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/FuturesGetChecked.java
@SuppressWarnings("rawtypes") // class literals Class<? extends Enum> theClass = Class.forName(CLASS_VALUE_VALIDATOR_NAME).asSubclass(Enum.class); return (GetCheckedTypeValidator) theClass.getEnumConstants()[0]; } catch (ClassNotFoundException | RuntimeException | Error t) { // ensure we really catch *everything* return weakSetValidator(); } } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 11.8K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
return get(implementation); } if (type == Stream.class) { return type.cast(Stream.empty()); } if (type.isEnum()) { T[] enumConstants = type.getEnumConstants(); return (enumConstants == null || enumConstants.length == 0) ? null : enumConstants[0]; } if (type.isArray()) { return createEmptyArray(type); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 21.4K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/ClassSanityTester.java
throws ParameterNotInstantiableException, IllegalAccessException, InvocationTargetException, FactoryMethodReturnsNullException { if (cls.isEnum()) { T[] constants = cls.getEnumConstants(); if (constants != null && constants.length > 0) { return constants[0]; } else { return null; } } TypeToken<T> type = TypeToken.of(cls);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 32.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
} Class<? extends T> implementation = getImplementation(type); if (implementation != null) { return get(implementation); } if (type.isEnum()) { T[] enumConstants = type.getEnumConstants(); return (enumConstants == null || enumConstants.length == 0) ? null : enumConstants[0]; } if (type.isArray()) { return createEmptyArray(type); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 20.9K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java
Object sample = pickInstance(samples, null); if (sample != null) { return sample; } if (rawType.isEnum()) { return pickInstance(rawType.getEnumConstants(), null); } if (type.isArray()) { TypeToken<?> componentType = requireNonNull(type.getComponentType()); Object array = Array.newInstance(componentType.getRawType(), 1);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 28.1K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/FreshValueGenerator.java
Object sample = pickInstance(samples, null); if (sample != null) { return sample; } if (rawType.isEnum()) { return pickInstance(rawType.getEnumConstants(), null); } if (type.isArray()) { TypeToken<?> componentType = requireNonNull(type.getComponentType()); Object array = Array.newInstance(componentType.getRawType(), 1);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 28.7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java
throws ParameterNotInstantiableException, IllegalAccessException, InvocationTargetException, FactoryMethodReturnsNullException { if (cls.isEnum()) { T[] constants = cls.getEnumConstants(); if (constants != null && constants.length > 0) { return constants[0]; } else { return null; } } TypeToken<T> type = TypeToken.of(cls);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 32.5K bytes - Viewed (0)