Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for RegularImmutableMap (0.16 sec)

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

     * @author Gregory Kick
     */
    @GwtCompatible(serializable = true, emulated = true)
    @ElementTypesAreNonnullByDefault
    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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue May 28 18:11:09 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  2. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 15 22:32:14 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/RegularImmutableBiMap.java

        this.size = size;
        this.keyOffset = 0;
        int tableSize = (size >= 2) ? ImmutableSet.chooseTableSize(size) : 0;
        this.keyHashTable =
            RegularImmutableMap.createHashTableOrThrow(alternatingKeysAndValues, size, tableSize, 0);
        Object valueHashTable =
            RegularImmutableMap.createHashTableOrThrow(alternatingKeysAndValues, size, tableSize, 1);
        this.inverse =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  4. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  5. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  6. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 44.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/ImmutableMapTest.java

        for (int i = 0; i < 10; i++) {
          builder.put(i, i);
        }
        Entry<Integer, Integer>[] builderArrayAfterPuts = builder.entries;
        RegularImmutableMap<Integer, Integer> map =
            (RegularImmutableMap<Integer, Integer>) builder.buildOrThrow();
        Entry<Integer, Integer>[] mapInternalArray = map.entries;
        assertSame(builderArray, builderArrayAfterPuts);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 41.1K bytes
    - Viewed (0)
  8. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 36.6K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/JdkBackedImmutableMap.java

     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.collect.RegularImmutableMap.makeImmutable;
    import static java.util.Objects.requireNonNull;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 4.8K bytes
    - Viewed (0)
Back to top