- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for RegularImmutableMap (0.44 sec)
-
guava/src/com/google/common/collect/RegularImmutableMap.java
* differs.) * * @author Jesse Wilson * @author Kevin Bourrillion * @author Gregory Kick */ @GwtCompatible final class RegularImmutableMap<K, V> extends ImmutableMap<K, V> { @SuppressWarnings("unchecked") static final ImmutableMap<Object, Object> EMPTY = new RegularImmutableMap<>((Entry<Object, Object>[]) ImmutableMap.EMPTY_ENTRY_ARRAY, null, 0); /**
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/RegularImmutableMap.java
// stored in the builder, which may use it to throw an exception later. static <K, V> RegularImmutableMap<K, V> create( int n, @Nullable Object[] alternatingKeysAndValues, @Nullable Builder<K, V> builder) { if (n == 0) { @SuppressWarnings("unchecked") RegularImmutableMap<K, V> empty = (RegularImmutableMap<K, V>) EMPTY; return empty; } else if (n == 1) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 22.5K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableMap.java
public static <K, V> ImmutableMap<K, V> of() { return (ImmutableMap<K, V>) RegularImmutableMap.EMPTY; } public static <K, V> ImmutableMap<K, V> of(K k1, V v1) { return ImmutableBiMap.of(k1, v1); } public static <K, V> ImmutableMap<K, V> of(K k1, V v1, K k2, V v2) { return new RegularImmutableMap<K, V>(entryOf(k1, v1), entryOf(k2, v2)); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 18:32:41 UTC 2025 - 16.7K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/RegularImmutableBiMap.java
} @SuppressWarnings("unchecked") @Override public @Nullable V get(@Nullable Object key) { Object result = RegularImmutableMap.get(keyHashTable, alternatingKeysAndValues, size, keyOffset, key); /* * We can't simply cast the result of `RegularImmutableMap.get` to V because of a bug in our * nullness checker (resulting from https://github.com/jspecify/checker-framework/issues/8). */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 4.2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableMap.java
* code. * * <p><b>Performance note:</b> the instance returned is a singleton. */ @SuppressWarnings("unchecked") public static <K, V> ImmutableMap<K, V> of() { return (ImmutableMap<K, V>) RegularImmutableMap.EMPTY; } /** * Returns an immutable map containing a single entry. This map behaves and performs comparably to * {@link Collections#singletonMap} but will not accept a null key or value. It is preferable
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/RegularImmutableBiMap.java
import static com.google.common.collect.ImmutableMapEntry.createEntryArray; import static com.google.common.collect.Maps.immutableEntry; import static com.google.common.collect.RegularImmutableMap.MAX_HASH_BUCKET_LENGTH; import static com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket; import static java.util.Objects.requireNonNull; import com.google.common.annotations.GwtCompatible;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 11.1K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableMap.java
return RegularImmutableMap.fromEntries(entryOf(k1, v1), entryOf(k2, v2)); } /** * Returns an immutable map containing the given entries, in order. * * @throws IllegalArgumentException if duplicate keys are provided */ public static <K, V> ImmutableMap<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 44.3K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/RegularImmutableBiMap.java
private final ImmutableBiMap<V, K> inverse; @SuppressWarnings("unchecked") // used only for the empty map, which works for any types RegularImmutableBiMap() { super(new RegularImmutableMap<K, V>(new HashMap<K, V>())); this.inverse = (ImmutableBiMap<V, K>) this; } RegularImmutableBiMap(ImmutableMap<K, V> delegate) { super(delegate);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Aug 06 14:59:07 UTC 2025 - 1.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java
for (int i = 0; i < 10; i++) { builder.put(i, i); } Object[] builderArrayAfterPuts = builder.alternatingKeysAndValues; RegularImmutableMap<Integer, Integer> map = (RegularImmutableMap<Integer, Integer>) builder.buildOrThrow(); Object[] mapInternalArray = map.alternatingKeysAndValues; assertSame(builderArray, builderArrayAfterPuts);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 36.7K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableMapEntry.java
import org.jspecify.annotations.Nullable; /** * Implementation of {@code Entry} for {@link ImmutableMap} that adds extra methods to traverse hash * buckets for the key and the value. This allows reuse in {@link RegularImmutableMap} and {@link * RegularImmutableBiMap}, which don't have to recopy the entries created by their {@code Builder} * implementations. *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue Jul 01 21:42:29 UTC 2025 - 4.6K bytes - Viewed (0)