Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 131 - 140 of 174 for AsMap (0.23 seconds)

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

        @CanIgnoreReturnValue
        @Override
        public Builder<K, V> putAll(Multimap<? extends K, ? extends V> multimap) {
          for (Entry<? extends K, ? extends Collection<? extends V>> entry :
              multimap.asMap().entrySet()) {
            putAll(entry.getKey(), entry.getValue());
          }
          return this;
        }
    
        @CanIgnoreReturnValue
        @Override
        Builder<K, V> combine(ImmutableMultimap.Builder<K, V> other) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Feb 19 22:57:35 GMT 2026
    - 26.3K bytes
    - Click Count (0)
  2. android/guava/src/com/google/common/collect/ImmutableMultimap.java

        }
    
        /**
         * Stores another multimap's entries in the built multimap. The generated multimap's key and
         * value orderings correspond to the iteration ordering of the {@code multimap.asMap()} view,
         * with new keys and values following any existing keys and values.
         *
         * @throws NullPointerException if any key or value in {@code multimap} is null. The builder is
         *     left in an invalid state.
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Dec 09 15:58:48 GMT 2025
    - 27.1K bytes
    - Click Count (0)
  3. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

        }
    
        @Override
        public long size() {
          return localCache.size();
        }
    
        @Override
        @J2ktIncompatible // Thread safety complexity
        public ConcurrentMap<K, V> asMap() {
          return localCache;
        }
      }
    
      /**
       * LocalLoadingCache is a wrapper around LocalCache for a cache with loading.
       *
       * @param <K> the base key type
       * @param <V> the base value type
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 03 12:40:22 GMT 2026
    - 21.6K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/cache/CacheReferencesTest.java

          cache.invalidate(key1);
          assertThat(cache.asMap().containsKey(key1)).isFalse();
          assertThat(cache.asMap().containsKey(key2)).isTrue();
          assertThat(cache.size()).isEqualTo(1);
          assertThat(cache.asMap().keySet()).isEqualTo(ImmutableSet.of(key2));
          assertThat(cache.asMap().values()).contains(value2);
          assertThat(cache.asMap().entrySet()).containsExactly(immutableEntry(key2, value2));
        }
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 18 18:06:14 GMT 2026
    - 5.1K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

            Object newValue = new Object();
            assertThat(cache.asMap().replace(entry.getKey(), newValue))
                .isSameInstanceAs(entry.getValue());
            assertThat(cache.asMap().replace(entry.getKey(), newValue, entry.getValue())).isTrue();
            Object newKey = new Object();
            assertThat(cache.asMap().replace(newKey, entry.getValue())).isNull();
            assertThat(cache.asMap().replace(newKey, entry.getValue(), newValue)).isFalse();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 18 18:06:14 GMT 2026
    - 15.4K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/cache/EmptyCachesTest.java

          Set<Object> keys = cache.asMap().keySet();
          assertThrows(NullPointerException.class, () -> keys.toArray((Object[]) null));
          checkEmpty(cache);
        }
      }
    
      public void testKeySet_addNotSupported() {
        for (LoadingCache<Object, Object> cache : caches()) {
          assertThrows(UnsupportedOperationException.class, () -> cache.asMap().keySet().add(1));
    
          assertThrows(
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 18 18:06:14 GMT 2026
    - 11.6K bytes
    - Click Count (0)
  7. guava-tests/test/com/google/common/cache/CacheEvictionTest.java

        // 1 won't be cached
        assertThat(cache.getUnchecked(1)).isEqualTo(1);
        assertThat(cache.asMap().keySet()).isEmpty();
    
        CacheTesting.processPendingNotifications(cache);
        assertThat(removalListener.getCount()).isEqualTo(1);
    
        // 2 will be cached
        assertThat(cache.getUnchecked(2)).isEqualTo(2);
        assertThat(cache.asMap().keySet()).containsExactly(2);
    
        CacheTesting.processPendingNotifications(cache);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 18 18:06:14 GMT 2026
    - 15K bytes
    - Click Count (0)
  8. android/guava-tests/test/com/google/common/cache/CacheReferencesTest.java

          cache.invalidate(key1);
          assertThat(cache.asMap().containsKey(key1)).isFalse();
          assertThat(cache.asMap().containsKey(key2)).isTrue();
          assertThat(cache.size()).isEqualTo(1);
          assertThat(cache.asMap().keySet()).isEqualTo(ImmutableSet.of(key2));
          assertThat(cache.asMap().values()).contains(value2);
          assertThat(cache.asMap().entrySet()).containsExactly(immutableEntry(key2, value2));
        }
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 18 18:06:14 GMT 2026
    - 5.1K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java

            nonZeroKeys.add(key);
          }
        }
        assertEquals(ITERATIONS, map.size());
        assertTrue(map.asMap().containsValue(0L));
    
        map.removeAllZeros();
        assertFalse(map.asMap().containsValue(0L));
        assertEquals(ITERATIONS / 2, map.size());
        assertEquals(nonZeroKeys, map.asMap().keySet());
      }
    
      public void testClear() {
        AtomicLongMap<Object> map = AtomicLongMap.create();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 17.5K bytes
    - Click Count (0)
  10. android/guava/src/com/google/common/graph/ImmutableNetwork.java

      }
    
      private static <N, E> NetworkConnections<N, E> connectionsOf(Network<N, E> network, N node) {
        if (network.isDirected()) {
          Map<E, N> inEdgeMap = Maps.asMap(network.inEdges(node), sourceNodeFn(network));
          Map<E, N> outEdgeMap = Maps.asMap(network.outEdges(node), targetNodeFn(network));
          int selfLoopCount = network.edgesConnecting(node, node).size();
          return network.allowsParallelEdges()
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 11 01:10:31 GMT 2026
    - 9.6K bytes
    - Click Count (0)
Back to Top