Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for RegularImmutableMap (0.61 sec)

  1. 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)
  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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 22.5K bytes
    - Viewed (0)
  3. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/RegularImmutableMap.java

    /**
     * GWt emulation of {@link RegularImmutableMap}.
     *
     * @author Hayward Chan
     */
    final class RegularImmutableMap<K, V> extends ForwardingImmutableMap<K, V> {
    
      static final ImmutableMap<Object, Object> EMPTY = new RegularImmutableMap<Object, Object>();
    
      RegularImmutableMap(Map<? extends K, ? extends V> delegate) {
        super(delegate);
      }
    
      RegularImmutableMap(Entry<? extends K, ? extends V>... entries) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top