Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 63 for BiMap (0.14 sec)

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

      /**
       * Returns the inverse view of this bimap, which maps each of this bimap's values to its
       * associated key. The two bimaps are backed by the same data; any changes to one will appear in
       * the other.
       *
       * <p><b>Note:</b>There is no guaranteed correspondence between the iteration order of a bimap and
       * that of its inverse.
       *
       * @return the inverse view of this bimap
       */
      BiMap<V, K> inverse();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sat Jun 17 14:40:53 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/BiMap.java

      /**
       * Returns the inverse view of this bimap, which maps each of this bimap's values to its
       * associated key. The two bimaps are backed by the same data; any changes to one will appear in
       * the other.
       *
       * <p><b>Note:</b>There is no guaranteed correspondence between the iteration order of a bimap and
       * that of its inverse.
       *
       * @return the inverse view of this bimap
       */
      BiMap<V, K> inverse();
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Sat Jun 17 14:40:53 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/SynchronizedBiMapTest.java

      }
    
      public void testInverse() {
        BiMap<String, Integer> bimap = create();
        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();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  4. 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)
  5. 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 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 26 16:35:21 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  6. 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)
  7. guava-testlib/src/com/google/common/collect/testing/google/DerivedGoogleCollectionGenerators.java

          implements TestMapGenerator<K, V>, DerivedGenerator {
    
        private final OneSizeTestContainerGenerator<BiMap<K, V>, Entry<K, V>> generator;
    
        public MapGenerator(
            OneSizeTestContainerGenerator<BiMap<K, V>, Entry<K, V>> oneSizeTestContainerGenerator) {
          this.generator = oneSizeTestContainerGenerator;
        }
    
        @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 6.7K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/EnumHashBiMap.java

    /**
     * A {@code BiMap} backed by an {@code EnumMap} instance for keys-to-values, and a {@code HashMap}
     * instance for values-to-keys. Null keys are not permitted, but null values are. An {@code
     * EnumHashBiMap} and its inverse are both serializable.
     *
     * <p>See the Guava User Guide article on <a href=
     * "https://github.com/google/guava/wiki/NewCollectionTypesExplained#bimap">{@code BiMap}</a>.
     *
     * @author Mike Bostock
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Aug 24 01:40:03 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/google/AbstractBiMapTester.java

    import com.google.common.collect.BiMap;
    import com.google.common.collect.testing.AbstractMapTester;
    import com.google.common.collect.testing.Helpers;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.List;
    import java.util.Map.Entry;
    import org.checkerframework.checker.nullness.qual.Nullable;
    import org.junit.Ignore;
    
    /** Skeleton for a tester of a {@code BiMap}. */
    @GwtCompatible
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/google/AbstractBiMapTester.java

    import com.google.common.collect.BiMap;
    import com.google.common.collect.testing.AbstractMapTester;
    import com.google.common.collect.testing.Helpers;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.List;
    import java.util.Map.Entry;
    import org.checkerframework.checker.nullness.qual.Nullable;
    import org.junit.Ignore;
    
    /** Skeleton for a tester of a {@code BiMap}. */
    @GwtCompatible
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.1K bytes
    - Viewed (0)
Back to top