Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 77 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/AbstractBiMapTest.java

      public void testIdentityKeySetIteratorRemove() {
        BiMap<Integer, String> bimap =
            new AbstractBiMap<Integer, String>(
                new IdentityHashMap<Integer, String>(), new IdentityHashMap<String, Integer>()) {};
        bimap.put(1, "one");
        bimap.put(2, "two");
        bimap.put(3, "three");
        Iterator<Integer> iterator = bimap.keySet().iterator();
        iterator.next();
        iterator.next();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu May 14 14:52:51 GMT 2020
    - 2.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/HashBiMap.java

          extends AbstractSet<T> {
        final HashBiMap<K, V> biMap;
    
        View(HashBiMap<K, V> biMap) {
          this.biMap = biMap;
        }
    
        @ParametricNullness
        abstract T forEntry(int entry);
    
        @Override
        public Iterator<T> iterator() {
          return new Iterator<T>() {
            private int index = biMap.firstInInsertionOrder;
            private int indexToRemove = ABSENT;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Mar 06 16:06:58 GMT 2023
    - 36.4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/HashBiMapTest.java

        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();
    
        for (int i = 0; i < N; i++) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/HashBiMapTest.java

        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();
    
        for (int i = 0; i < N; i++) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/google/BiMapClearTester.java

    import static com.google.common.collect.testing.features.MapFeature.SUPPORTS_REMOVE;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.collect.BiMap;
    import com.google.common.collect.testing.features.MapFeature;
    import org.junit.Ignore;
    
    /**
     * Tester for {@code BiMap.clear}.
     *
     * @author Louis Wasserman
     */
    @GwtCompatible
    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 2.5K bytes
    - Viewed (0)
  8. 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)
  9. android/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 26 12:43:10 GMT 2024
    - Last Modified: Thu Aug 24 01:40:03 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  10. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 21.3K bytes
    - Viewed (0)
Back to top