Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for BiMap (0.16 sec)

  1. 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 Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Oct 31 16:03:42 GMT 2023
    - 22.6K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. guava/src/com/google/common/collect/HashBiMap.java

      }
    
      @LazyInit @RetainedWith @CheckForNull private transient BiMap<V, K> inverse;
    
      @Override
      public BiMap<V, K> inverse() {
        BiMap<V, K> result = inverse;
        return (result == null) ? inverse = new Inverse() : result;
      }
    
      private final class Inverse extends IteratorBasedAbstractMap<V, K>
          implements BiMap<V, K>, Serializable {
        BiMap<K, V> forward() {
          return HashBiMap.this;
        }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Oct 13 14:11:58 GMT 2023
    - 24.5K bytes
    - Viewed (0)
  8. 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)
  9. guava/src/com/google/common/collect/AbstractBiMap.java

          super(backward, forward);
        }
    
        /*
         * Serialization stores the forward bimap, the inverse of this inverse.
         * Deserialization calls inverse() on the forward bimap and returns that
         * inverse.
         *
         * If a bimap and its inverse are serialized together, the deserialized
         * instances have inverse() methods that return the other.
         */
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Aug 24 01:40:03 GMT 2023
    - 14.6K bytes
    - Viewed (0)
  10. 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)
Back to top