Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 77 for BiMap (0.2 sec)

  1. 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)
  2. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 16:35:21 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/AbstractImmutableBiMapMapInterfaceTest.java

      @Override
      protected final void assertMoreInvariants(Map<K, V> map) {
        BiMap<K, V> bimap = (BiMap<K, V>) map;
    
        for (Entry<K, V> entry : map.entrySet()) {
          assertEquals(entry.getKey() + "=" + entry.getValue(), entry.toString());
          assertEquals(entry.getKey(), bimap.inverse().get(entry.getValue()));
        }
    
        assertEquals("{" + JOINER.join(map.entrySet()) + "}", map.toString());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Mar 09 16:16:28 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/SynchronizedBiMapTest.java

        BiMap<Integer, String> inverse = bimap.inverse();
        assertSame(bimap, inverse.inverse());
        assertTrue(inverse instanceof SynchronizedBiMap);
        assertSame(mutex, ((SynchronizedBiMap<?, ?>) inverse).mutex);
      }
    
      @Override
      public void testValues() {
        BiMap<String, Integer> map = create();
        Set<Integer> values = map.values();
        assertTrue(values instanceof SynchronizedSet);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/google/TestBiMapGenerator.java

     * limitations under the License.
     */
    
    package com.google.common.collect.testing.google;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.collect.BiMap;
    import com.google.common.collect.testing.TestContainerGenerator;
    import java.util.Map.Entry;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Creates bimaps, containing sample entries, to be tested.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/collect/testing/google/TestBiMapGenerator.java

     * limitations under the License.
     */
    
    package com.google.common.collect.testing.google;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.collect.BiMap;
    import com.google.common.collect.testing.TestContainerGenerator;
    import java.util.Map.Entry;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Creates bimaps, containing sample entries, to be tested.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  7. 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)
  8. guava-tests/test/com/google/common/collect/MapsTest.java

      }
    
      public void testAsConverter_withNullMapping() throws Exception {
        BiMap<String, @Nullable Integer> biMap = HashBiMap.create();
        biMap.put("one", 1);
        biMap.put("two", 2);
        biMap.put("three", null);
        try {
          Maps.asConverter((BiMap<String, Integer>) biMap).convert("three");
          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 16:06:01 GMT 2024
    - 67.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/MapsTest.java

      }
    
      public void testAsConverter_withNullMapping() throws Exception {
        BiMap<String, @Nullable Integer> biMap = HashBiMap.create();
        biMap.put("one", 1);
        biMap.put("two", 2);
        biMap.put("three", null);
        try {
          Maps.asConverter((BiMap<String, Integer>) biMap).convert("three");
          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Mar 04 16:06:01 GMT 2024
    - 64.3K bytes
    - Viewed (0)
  10. 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"));
      }
    
      public void testCreateFromMap() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 16:35:21 GMT 2024
    - 8.1K bytes
    - Viewed (0)
Back to top