Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for HashBiMap (0.08 sec)

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

                "chile", "peso",
                "switzerland", "franc");
        HashBiMap<String, String> bimap = HashBiMap.create(map);
        assertEquals("dollar", bimap.get("canada"));
        assertEquals("canada", bimap.inverse().get("dollar"));
      }
    
      private static final int N = 1000;
    
      public void testBashIt() throws Exception {
        BiMap<Integer, Integer> bimap = HashBiMap.create(N);
        BiMap<Integer, Integer> inverse = bimap.inverse();
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/FilteredBiMapTest.java

    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public class FilteredBiMapTest extends AbstractFilteredMapTest {
      @Override
      BiMap<String, Integer> createUnfiltered() {
        return HashBiMap.create();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Feb 19 20:34:55 UTC 2024
    - 899 bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

      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
      static <K, V> ImmutableBiMap<K, V> generateImmutableBimap(K key, V value) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

      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
      static <K, V> ImmutableBiMap<K, V> generateImmutableBimap(K key, V value) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/EnumHashBiMapTest.java

      }
    
      public void testCreate() {
        EnumHashBiMap<Currency, String> bimap = EnumHashBiMap.create(Currency.class);
        assertTrue(bimap.isEmpty());
        assertEquals("{}", bimap.toString());
        assertEquals(HashBiMap.create(), bimap);
        bimap.put(Currency.DOLLAR, "dollar");
        assertEquals("dollar", bimap.get(Currency.DOLLAR));
        assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar"));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/BenchmarkHelpers.java

          }
        };
      }
    
      enum BiMapImpl implements MapsImplEnum {
        HashBiMapImpl {
          @Override
          public <K extends Comparable<K>, V> BiMap<K, V> create(Map<K, V> map) {
            return HashBiMap.create(map);
          }
        },
        ImmutableBiMapImpl {
          @Override
          public <K extends Comparable<K>, V> BiMap<K, V> create(Map<K, V> map) {
            return ImmutableBiMap.copyOf(map);
          }
        };
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  7. 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));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/BenchmarkHelpers.java

          }
        };
      }
    
      enum BiMapImpl implements MapsImplEnum {
        HashBiMapImpl {
          @Override
          public <K extends Comparable<K>, V> BiMap<K, V> create(Map<K, V> map) {
            return HashBiMap.create(map);
          }
        },
        ImmutableBiMapImpl {
          @Override
          public <K extends Comparable<K>, V> BiMap<K, V> create(Map<K, V> map) {
            return ImmutableBiMap.copyOf(map);
          }
        };
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Maps.java

       * <p>It is imperative that the user manually synchronize on the returned map when accessing any
       * of its collection views:
       *
       * <pre>{@code
       * BiMap<Long, String> map = Maps.synchronizedBiMap(
       *     HashBiMap.<Long, String>create());
       * ...
       * Set<Long> set = map.keySet();  // Needn't be in synchronized block
       * ...
       * synchronized (map) {  // Synchronizing on map, not set!
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 161.6K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/Maps.java

       * <p>It is imperative that the user manually synchronize on the returned map when accessing any
       * of its collection views:
       *
       * <pre>{@code
       * BiMap<Long, String> map = Maps.synchronizedBiMap(
       *     HashBiMap.<Long, String>create());
       * ...
       * Set<Long> set = map.keySet();  // Needn't be in synchronized block
       * ...
       * synchronized (map) {  // Synchronizing on map, not set!
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 167.4K bytes
    - Viewed (0)
Back to top