Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 158 for enum (0.2 sec)

  1. android/guava-tests/test/com/google/common/collect/EnumMultisetTest.java

      }
    
      // Wrapper of EnumMultiset factory methods, because we need to skip create(Class).
      // create(Enum1.class) is equal to create(Enum2.class) but testEquals() expects otherwise.
      // For the same reason, we need to skip create(Iterable, Class).
      private static class EnumMultisetFactory {
        public static <E extends Enum<E>> EnumMultiset<E> create(Iterable<E> elements) {
          return EnumMultiset.create(elements);
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 16:35:21 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

      }
    
      // A static mapping from an Enum type to its set of LockGraphNodes.
      private static final ConcurrentMap<
              Class<? extends Enum<?>>, Map<? extends Enum<?>, LockGraphNode>>
          lockGraphNodesPerType = new MapMaker().weakKeys().makeMap();
    
      /** Creates a {@code CycleDetectingLockFactory.WithExplicitOrdering<E>}. */
      public static <E extends Enum<E>> WithExplicitOrdering<E> newInstanceWithExplicitOrdering(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 35.9K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableEnumSet.java

     */
    @GwtCompatible(serializable = true, emulated = true)
    @SuppressWarnings("serial") // we're overriding default serialization
    @ElementTypesAreNonnullByDefault
    final class ImmutableEnumSet<E extends Enum<E>> extends ImmutableSet<E> {
      static <E extends Enum<E>> ImmutableSet<E> asImmutable(EnumSet<E> set) {
        switch (set.size()) {
          case 0:
            return ImmutableSet.of();
          case 1:
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/TestEnumSetGenerator.java

    package com.google.common.collect.testing;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.collect.testing.SampleElements.Enums;
    import java.util.Collections;
    import java.util.List;
    import java.util.Set;
    
    /**
     * An abstract TestSetGenerator for generating sets containing enum values.
     *
     * @author Kevin Bourrillion
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetFeature.java

    /**
     * Optional features of classes derived from {@link Multiset}.
     *
     * @author Louis Wasserman
     */
    @SuppressWarnings("rawtypes") // maybe avoidable if we rework the whole package?
    @GwtCompatible
    public enum MultisetFeature implements Feature<Multiset> {
      /**
       * Indicates that elements from {@code Multiset.entrySet()} update to reflect changes in the
       * backing multiset.
       */
      ENTRIES_ARE_VIEWS;
    
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/base/Platform.java

         * is referenced somewhere for as long as the enum class is loaded. *Maybe in theory* the enum
         * class could be unloaded after the above call to `getEnumConstants` but before we call
         * `get()`, but that is vanishingly unlikely.
         */
        return ref == null ? Optional.absent() : Optional.fromNullable(enumClass.cast(ref.get()));
      }
    
      static String formatCompact4Digits(double value) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 15 22:32:14 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/CollectCollectors.java

      @IgnoreJRERequirement // see enclosing class (whose annotation Animal Sniffer ignores here...)
      private static final class EnumSetAccumulator<E extends Enum<E>> {
        @SuppressWarnings({"rawtypes", "unchecked"})
        static final Collector<Enum<?>, ?, ImmutableSet<? extends Enum<?>>> TO_IMMUTABLE_ENUM_SET =
            (Collector) toImmutableEnumSetGeneric();
    
        @CheckForNull private EnumSet<E> set;
    
        void add(E e) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:21:40 GMT 2024
    - 17.2K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/EnumMultiset.java

        this.enumConstants = type.getEnumConstants();
        this.counts = new int[enumConstants.length];
      }
    
      private boolean isActuallyE(@CheckForNull Object o) {
        if (o instanceof Enum) {
          Enum<?> e = (Enum<?>) o;
          int index = e.ordinal();
          return index < enumConstants.length && enumConstants[index] == e;
        }
        return false;
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/features/SetFeature.java

    /**
     * Optional features of classes derived from {@code Set}.
     *
     * @author George van den Driessche
     */
    @SuppressWarnings("rawtypes") // maybe avoidable if we rework the whole package?
    @GwtCompatible
    public enum SetFeature implements Feature<Set> {
      GENERAL_PURPOSE(CollectionFeature.GENERAL_PURPOSE);
    
      private final Set<Feature<? super Set>> implied;
    
      SetFeature(Feature<? super Set>... implied) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/EnumBiMapTest.java

     */
    @J2ktIncompatible // EnumBimap
    @GwtCompatible(emulated = true)
    @ElementTypesAreNonnullByDefault
    public class EnumBiMapTest extends TestCase {
      private enum Currency {
        DOLLAR,
        FRANC,
        PESO,
        POUND,
        YEN
      }
    
      private enum Country {
        CANADA,
        CHILE,
        JAPAN,
        SWITZERLAND,
        UK
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 26 16:35:21 GMT 2024
    - 11.8K bytes
    - Viewed (0)
Back to top