Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for MapMaker (0.09 sec)

  1. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/MapMaker.java

    import java.util.concurrent.ConcurrentHashMap;
    import java.util.concurrent.ConcurrentMap;
    
    /**
     * MapMaker emulation.
     *
     * @author Charles Fry
     */
    @ElementTypesAreNonnullByDefault
    public final class MapMaker {
      private int initialCapacity = 16;
    
      public MapMaker() {}
    
      @CanIgnoreReturnValue
      public MapMaker initialCapacity(int initialCapacity) {
        if (initialCapacity < 0) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jan 23 18:43:40 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/cache/MapMakerComparisonBenchmark.java

     */
    
    package com.google.common.cache;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.common.collect.MapMaker;
    import java.util.Map;
    
    /**
     * Compare CacheBuilder and MapMaker performance, ensuring that they remain on par with each other.
     *
     * @author Nikita Sidorov
     */
    @SuppressWarnings("CheckReturnValue")
    public class MapMakerComparisonBenchmark {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Aug 05 17:21:46 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Interners.java

         *
         * @see MapMaker#concurrencyLevel(int)
         */
        public InternerBuilder concurrencyLevel(int concurrencyLevel) {
          this.mapMaker.concurrencyLevel(concurrencyLevel);
          return this;
        }
    
        public <E> Interner<E> build() {
          if (!strong) {
            mapMaker.weakKeys();
          }
          return new InternerImpl<>(mapMaker);
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Mar 13 14:30:51 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/MapMakerTest.java

       * anywhere else
       */
    
      public void testInitialCapacity_negative() {
        MapMaker maker = new MapMaker();
        assertThrows(IllegalArgumentException.class, () -> maker.initialCapacity(-1));
      }
    
      // TODO(cpovirk): enable when ready (apparently after a change to our GWT emulation)
      public void xtestInitialCapacity_setTwice() {
        MapMaker maker = new MapMaker().initialCapacity(16);
        try {
          // even to the same value is not allowed
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Interners.java

         *
         * @see MapMaker#concurrencyLevel(int)
         */
        public InternerBuilder concurrencyLevel(int concurrencyLevel) {
          this.mapMaker.concurrencyLevel(concurrencyLevel);
          return this;
        }
    
        public <E> Interner<E> build() {
          if (!strong) {
            mapMaker.weakKeys();
          }
          return new InternerImpl<>(mapMaker);
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Mar 13 14:30:51 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/MapMakerTest.java

       * anywhere else
       */
    
      public void testInitialCapacity_negative() {
        MapMaker maker = new MapMaker();
        assertThrows(IllegalArgumentException.class, () -> maker.initialCapacity(-1));
      }
    
      // TODO(cpovirk): enable when ready (apparently after a change to our GWT emulation)
      public void xtestInitialCapacity_setTwice() {
        MapMaker maker = new MapMaker().initialCapacity(16);
        try {
          // even to the same value is not allowed
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 15 17:36:06 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/ConcurrentHashMultisetBasherTest.java

        testAddAndRemove(new ConcurrentSkipListMap<String, AtomicInteger>());
      }
    
      public void testAddAndRemove_mapMakerMap() throws Exception {
        MapMaker mapMaker = new MapMaker();
        // force MapMaker to use its own MapMakerInternalMap
        mapMaker.useCustomMap = true;
        testAddAndRemove(mapMaker.<String, AtomicInteger>makeMap());
      }
    
      private void testAddAndRemove(ConcurrentMap<String, AtomicInteger> map)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java

      @JsType(isNative = true, name = "Array", namespace = JsPackage.GLOBAL)
      private interface NativeArray {
        @JsProperty
        void setLength(int length);
      }
    
      static MapMaker tryWeakKeys(MapMaker mapMaker) {
        return mapMaker;
      }
    
      static <E extends Enum<E>> Class<E> getDeclaringClassOrObjectForJ2cl(E e) {
        Class<E> classOrNull = getDeclaringClassOrNullForJ2cl(e);
        @SuppressWarnings("unchecked")
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Aug 06 17:52:51 UTC 2024
    - 5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java

      }
    
      public void testSerializationWithMapMaker1() {
        ConcurrentMap<String, AtomicInteger> map = new MapMaker().makeMap();
        multiset = ConcurrentHashMultiset.create(map);
        reserializeAndAssert(multiset);
      }
    
      public void testSerializationWithMapMaker2() {
        ConcurrentMap<String, AtomicInteger> map = new MapMaker().makeMap();
        multiset = ConcurrentHashMultiset.create(map);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 14.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java

      }
    
      public void testSerializationWithMapMaker1() {
        ConcurrentMap<String, AtomicInteger> map = new MapMaker().makeMap();
        multiset = ConcurrentHashMultiset.create(map);
        reserializeAndAssert(multiset);
      }
    
      public void testSerializationWithMapMaker2() {
        ConcurrentMap<String, AtomicInteger> map = new MapMaker().makeMap();
        multiset = ConcurrentHashMultiset.create(map);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 14.2K bytes
    - Viewed (0)
Back to top