- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for getEnumConstants (0.06 sec)
-
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 Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 9.3K bytes - Viewed (0) -
android/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 Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Jul 01 13:41:58 UTC 2025 - 4.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/EnumsTest.java
assertThat(result).isPresent(); shadowConstants.add(result.get()); } assertEquals(ImmutableSet.<Object>copyOf(shadowTestEnum.getEnumConstants()), shadowConstants); Optional<TestEnum> result = Enums.getIfPresent(shadowTestEnum, "blibby"); assertThat(result).isAbsent(); return new WeakReference<>(shadowLoader); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 20:07:52 UTC 2025 - 8.3K 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 Dec 26 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 Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 23 17:50:58 UTC 2025 - 21.4K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java
*/ @VisibleForTesting static <E extends Enum<E>> Map<E, LockGraphNode> createNodes(Class<E> clazz) { EnumMap<E, LockGraphNode> map = Maps.newEnumMap(clazz); E[] keys = clazz.getEnumConstants(); int numKeys = keys.length; ArrayList<LockGraphNode> nodes = Lists.newArrayListWithCapacity(numKeys); // Create a LockGraphNode for each enum value. for (E key : keys) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Sep 11 17:06:34 UTC 2025 - 35.9K 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 Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 23 17:50:58 UTC 2025 - 20.9K 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 Dec 26 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 Dec 26 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/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 Dec 26 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 28.1K bytes - Viewed (0)