Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ImmutableEnumMap (0.07 sec)

  1. android/guava/src/com/google/common/collect/ImmutableEnumMap.java

            Entry<K, V> entry = getOnlyElement(map.entrySet());
            return ImmutableMap.of(entry.getKey(), entry.getValue());
          default:
            return new ImmutableEnumMap<>(map);
        }
      }
    
      private final transient EnumMap<K, V> delegate;
    
      private ImmutableEnumMap(EnumMap<K, V> delegate) {
        this.delegate = delegate;
        checkArgument(!delegate.isEmpty());
      }
    
      @Override
      UnmodifiableIterator<K> keyIterator() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/ImmutableEnumMap.java

            Entry<K, V> entry = getOnlyElement(map.entrySet());
            return ImmutableMap.of(entry.getKey(), entry.getValue());
          default:
            return new ImmutableEnumMap<>(map);
        }
      }
    
      private final transient EnumMap<K, V> delegate;
    
      private ImmutableEnumMap(EnumMap<K, V> delegate) {
        this.delegate = delegate;
        checkArgument(!delegate.isEmpty());
      }
    
      @Override
      UnmodifiableIterator<K> keyIterator() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/ImmutableEnumMapTest.java

            map.put(entry.getKey(), entry.getValue());
          }
          return Maps.immutableEnumMap(map);
        }
      }
    
      @J2ktIncompatible
      @GwtIncompatible // suite
      public static Test suite() {
        TestSuite suite = new TestSuite();
        suite.addTest(
            MapTestSuiteBuilder.using(new ImmutableEnumMapGenerator())
                .named("Maps.immutableEnumMap")
                .withFeatures(CollectionSize.ANY, SERIALIZABLE, ALLOWS_NULL_QUERIES)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/google/MapGenerators.java

          Map<AnEnum, String> map = Maps.newHashMap();
          for (Entry<AnEnum, String> entry : entries) {
            checkNotNull(entry);
            map.put(entry.getKey(), entry.getValue());
          }
          return Maps.immutableEnumMap(map);
        }
      }
    
      public static class ImmutableMapCopyOfEnumMapGenerator extends TestEnumMapGenerator {
        @Override
        protected Map<AnEnum, String> create(Entry<AnEnum, String>[] entries) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/ImmutableMapTest.java

      public void testCopyOfEnumMap() {
        EnumMap<AnEnum, String> map = new EnumMap<>(AnEnum.class);
        map.put(AnEnum.B, "foo");
        map.put(AnEnum.C, "bar");
        assertTrue(ImmutableMap.copyOf(map) instanceof ImmutableEnumMap);
      }
    
      @J2ktIncompatible
      @GwtIncompatible // SerializableTester
      public void testViewSerialization() {
        Map<String, Integer> map = ImmutableMap.of("one", 1, "two", 2, "three", 3);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ImmutableMap.java

        EnumMap<K, V> copy = new EnumMap<>((EnumMap<K, ? extends V>) original);
        for (Entry<K, V> entry : copy.entrySet()) {
          checkEntryNotNull(entry.getKey(), entry.getValue());
        }
        return ImmutableEnumMap.asImmutable(copy);
      }
    
      static final Entry<?, ?>[] EMPTY_ENTRY_ARRAY = new Entry<?, ?>[0];
    
      abstract static class IteratorBasedImmutableMap<K, V> extends ImmutableMap<K, V> {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 44.6K bytes
    - Viewed (0)
Back to top