Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for getEnumConstants (0.07 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
Back to top