Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for trimToSize (0.04 sec)

  1. guava/src/com/google/common/collect/ArrayListMultimap.java

       *     ImmutableListMultimap}. If you need a mutable collection, remove the {@code trimToSize}
       *     call, or switch to a {@code HashMap<K, ArrayList<V>>}.
       */
      @Deprecated
      public void trimToSize() {
        for (Collection<V> collection : backingMap().values()) {
          ArrayList<V> arrayList = (ArrayList<V>) collection;
          arrayList.trimToSize();
        }
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/DiskLruCache.kt

            entry.currentEditor?.detach() // Prevent the edit from completing normally.
          }
        }
    
        trimToSize()
        journalWriter?.closeQuietly()
        journalWriter = null
        closed = true
      }
    
      @Throws(IOException::class)
      fun trimToSize() {
        while (size > maxSize) {
          if (!removeOldestEntry()) return
        }
        mostRecentTrimFailed = false
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 34.7K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/CompactLinkedHashMapTest.java

        CompactLinkedHashMap<Integer, String> map = CompactLinkedHashMap.createWithExpectedSize(100);
        map.put(1, "a");
        map.put(4, "b");
        map.put(3, "d");
        map.put(2, "c");
        map.trimToSize();
        assertThat(map.entries).hasLength(4);
        assertThat(map.keys).hasLength(4);
        assertThat(map.values).hasLength(4);
        assertThat(map.links).hasLength(4);
        assertEquals(4, map.size());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/ArrayListMultimapTest.java

      public void testTrimToSize() {
        ArrayListMultimap<String, Integer> multimap = ArrayListMultimap.create();
        multimap.put("foo", 1);
        multimap.put("foo", 2);
        multimap.put("bar", 3);
        multimap.trimToSize();
        assertEquals(3, multimap.size());
        assertThat(multimap.get("foo")).containsExactly(1, 2).inOrder();
        assertThat(multimap.get("bar")).contains(3);
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 6.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/CompactLinkedHashMapTest.java

        CompactLinkedHashMap<Integer, String> map = CompactLinkedHashMap.createWithExpectedSize(100);
        map.put(1, "a");
        map.put(4, "b");
        map.put(3, "d");
        map.put(2, "c");
        map.trimToSize();
        assertThat(map.entries).hasLength(4);
        assertThat(map.keys).hasLength(4);
        assertThat(map.values).hasLength(4);
        assertThat(map.links).hasLength(4);
        assertEquals(4, map.size());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 7.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/CompactHashSet.java

      }
    
      /**
       * Ensures that this {@code CompactHashSet} has the smallest representation in memory, given its
       * current size.
       */
      public void trimToSize() {
        if (needsAllocArrays()) {
          return;
        }
        Set<E> delegate = delegateOrNull();
        if (delegate != null) {
          Set<E> newDelegate = createHashFloodingResistantDelegate(size());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 23.9K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/CompactHashMap.java

          }
        };
      }
    
      /**
       * Ensures that this {@code CompactHashMap} has the smallest representation in memory, given its
       * current size.
       */
      public void trimToSize() {
        if (needsAllocArrays()) {
          return;
        }
        Map<K, V> delegate = delegateOrNull();
        if (delegate != null) {
          Map<K, V> newDelegate = createHashFloodingResistantDelegate(size());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 39.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/CompactHashMap.java

            return value(entry);
          }
        };
      }
    
      /**
       * Ensures that this {@code CompactHashMap} has the smallest representation in memory, given its
       * current size.
       */
      public void trimToSize() {
        if (needsAllocArrays()) {
          return;
        }
        Map<K, V> delegate = delegateOrNull();
        if (delegate != null) {
          Map<K, V> newDelegate = createHashFloodingResistantDelegate(size());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 35.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/base/CharMatcher.java

          super(description);
          if (table.length() + Long.SIZE < table.size()) {
            table = (BitSet) table.clone();
            // If only we could actually call BitSet.trimToSize() ourselves...
          }
          this.table = table;
        }
    
        @Override
        public boolean matches(char c) {
          return table.get(c);
        }
    
        @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 53.9K bytes
    - Viewed (0)
Back to top