- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for slots (0.01 sec)
-
guava/src/com/google/common/collect/RegularImmutableMap.java
// If duplicates are allowed, this IdentityHashMap will record the final Entry for each // duplicated key. We will use this final Entry to overwrite earlier slots in the entries array // that have the same key. Then a second pass will remove all but the first of the slots that // have this Entry. The value in the map becomes false when this first entry has been copied, so // we know not to copy the remaining ones.
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 15.8K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableMap.java
} private @Nullable Object[] lastEntryForEachKey( @Nullable Object[] localAlternatingKeysAndValues, int size) { Set<Object> seenKeys = new HashSet<>(); BitSet dups = new BitSet(); // slots that are overridden by a later duplicate key for (int i = size - 1; i >= 0; i--) { Object key = requireNonNull(localAlternatingKeysAndValues[2 * i]); if (!seenKeys.add(key)) { dups.set(i);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 41.2K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableMap.java
*/ private static <K, V> Entry<K, V> @Nullable [] lastEntryForEachKey( Entry<K, V>[] entries, int size) { Set<K> seen = new HashSet<>(); BitSet dups = new BitSet(); // slots that are overridden by a later duplicate key for (int i = size - 1; i >= 0; i--) { if (!seen.add(entries[i].getKey())) { dups.set(i); } } if (dups.isEmpty()) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 44.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/MathTesting.java
// Add values up to 40. This covers cases like "square of a prime" and such. for (int i = 1; i <= 40; i++) { intValues.add(i); } // Now add values near 2^N for lots of values of N. for (int exponent : asList(2, 3, 4, 9, 15, 16, 17, 24, 25, 30)) { int x = 1 << exponent; intValues.add(x, x + 1, x - 1); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Aug 10 19:54:19 UTC 2025 - 11.3K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/EnumHashBiMap.java
/* * TODO: cpovirk - Pre-size the HashMap based on the number of enum values? (But *not* based on * the number of entries in the map, as that makes it easy for hostile inputs to trigger lots of * allocation—not that any program should be deserializing hostile inputs to begin with!) */ setDelegates(new EnumMap<K, V>(keyTypeOrObjectUnderJ2cl), new HashMap<V, K>());
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 5.2K bytes - Viewed (0) -
guava/src/com/google/common/base/Suppliers.java
return new ExpiringMemoizingSupplier<>(delegate, toNanosSaturated(duration)); } @VisibleForTesting @SuppressWarnings("GoodTime") // lots of violations static final class ExpiringMemoizingSupplier<T extends @Nullable Object> implements Supplier<T>, Serializable { private transient Object lock = new Object(); final Supplier<T> delegate;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 16.5K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Suppliers.java
return new ExpiringMemoizingSupplier<>(delegate, toNanosSaturated(duration)); } @VisibleForTesting @SuppressWarnings("GoodTime") // lots of violations static final class ExpiringMemoizingSupplier<T extends @Nullable Object> implements Supplier<T>, Serializable { private transient Object lock = new Object(); final Supplier<T> delegate;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 16.5K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Ints.java
// fgha[c]|[b]de -> fgha[b]|[c]de. Because these two blocks are the same size, we are done. // The Dolphin algorithm is attractive because it does the fewest array reads and writes: each // array slot is read and written exactly once. However, it can have very poor memory locality: // benchmarking shows it can take 7 times longer than the other two in some cases. The other two
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 31.4K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/Striped.java
// We only ever register ArrayReferences with the queue so this is always safe. ArrayReference<? extends L> arrayRef = (ArrayReference<? extends L>) ref; // Try to clear out the array slot, n.b. if we fail that is fine, in either case the // arrayRef will be out of the array after this step. locks.compareAndSet(arrayRef.index, arrayRef, null); } } @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 20.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java
/** * This is a less carefully-controlled version of {@link #testRemovalNotification_clear} - this is * a black-box test that tries to create lots of different thread-interleavings, and asserts that * each computation is affected by a call to {@code clear()} (and therefore gets passed to the
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 25.1K bytes - Viewed (0)