Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for BiMap (0.26 sec)

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

        hashMap.put("two", 2);
        ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf(hashMap);
        assertMapEquals(bimap, "one", 1, "two", 2);
        assertMapEquals(bimap.inverse(), 1, "one", 2, "two");
      }
    
      public void testFromImmutableMap() {
        ImmutableBiMap<String, Integer> bimap =
            ImmutableBiMap.copyOf(
                new ImmutableMap.Builder<String, Integer>()
                    .put("one", 1)
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/ImmutableBiMapTest.java

        hashMap.put("two", 2);
        ImmutableBiMap<String, Integer> bimap = ImmutableBiMap.copyOf(hashMap);
        assertMapEquals(bimap, "one", 1, "two", 2);
        assertMapEquals(bimap.inverse(), 1, "one", 2, "two");
      }
    
      public void testFromImmutableMap() {
        ImmutableBiMap<String, Integer> bimap =
            ImmutableBiMap.copyOf(
                new ImmutableMap.Builder<String, Integer>()
                    .put("one", 1)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 21.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/MapsCollectionTest.java

                      @Override
                      protected BiMap<String, String> create(Entry<String, String>[] entries) {
                        BiMap<String, String> bimap = HashBiMap.create(entries.length);
                        for (Entry<String, String> entry : entries) {
                          checkArgument(!bimap.containsKey(entry.getKey()));
                          bimap.put(entry.getKey(), entry.getValue());
                        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 20:09:59 GMT 2024
    - 32.2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/EnumBiMapTest.java

      public void testCreate() {
        EnumBiMap<Currency, Country> bimap = EnumBiMap.create(Currency.class, Country.class);
        assertTrue(bimap.isEmpty());
        assertEquals("{}", bimap.toString());
        assertEquals(HashBiMap.create(), bimap);
        bimap.put(Currency.DOLLAR, Country.CANADA);
        assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR));
        assertEquals(Currency.DOLLAR, bimap.inverse().get(Country.CANADA));
      }
    
    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)
  5. android/guava-tests/test/com/google/common/collect/EnumBiMapTest.java

      public void testCreate() {
        EnumBiMap<Currency, Country> bimap = EnumBiMap.create(Currency.class, Country.class);
        assertTrue(bimap.isEmpty());
        assertEquals("{}", bimap.toString());
        assertEquals(HashBiMap.create(), bimap);
        bimap.put(Currency.DOLLAR, Country.CANADA);
        assertEquals(Country.CANADA, bimap.get(Currency.DOLLAR));
        assertEquals(Currency.DOLLAR, bimap.inverse().get(Country.CANADA));
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 16:35:21 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableBiMap.java

          ImmutableBiMap<K, V> bimap = (ImmutableBiMap<K, V>) map;
          // TODO(lowasser): if we need to make a copy of a BiMap because the
          // forward map is a view, don't make a copy of the non-view delegate map
          if (!bimap.isPartialView()) {
            return bimap;
          }
        }
        return copyOf(map.entrySet());
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/MapsCollectionTest.java

                      @Override
                      protected BiMap<String, String> create(Entry<String, String>[] entries) {
                        BiMap<String, String> bimap = HashBiMap.create(entries.length);
                        for (Entry<String, String> entry : entries) {
                          checkArgument(!bimap.containsKey(entry.getKey()));
                          bimap.put(entry.getKey(), entry.getValue());
                        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 20:09:59 GMT 2024
    - 32.2K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

      }
    
      @Generates
      static <K, V> BiMap<K, V> generateBimap(@Nullable K key, @Nullable V value) {
        return generateHashBiMap(key, value);
      }
    
      @Generates
      static <K, V> HashBiMap<K, V> generateHashBiMap(@Nullable K key, @Nullable V value) {
        HashBiMap<K, V> bimap = HashBiMap.create();
        bimap.put(key, value);
        return bimap;
      }
    
      @Generates
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 28.6K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

      }
    
      @Generates
      static <K, V> BiMap<K, V> generateBimap(@Nullable K key, @Nullable V value) {
        return generateHashBiMap(key, value);
      }
    
      @Generates
      static <K, V> HashBiMap<K, V> generateHashBiMap(@Nullable K key, @Nullable V value) {
        HashBiMap<K, V> bimap = HashBiMap.create();
        bimap.put(key, value);
        return bimap;
      }
    
      @Generates
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 28K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/base/Functions.java

       * #forMap(Map, Object)}, which returns a default value in this case.
       *
       * <p>Note: if {@code map} is a {@link com.google.common.collect.BiMap BiMap} (or can be one), you
       * can use {@link com.google.common.collect.Maps#asConverter Maps.asConverter} instead to get a
       * function that also supports reverse conversion.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 14.1K bytes
    - Viewed (0)
Back to top