Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for entryArray (0.61 sec)

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

          entryArray[i] = makeImmutable(requireNonNull(entryArray[i]));
          K key = entryArray[i].getKey();
          V value = entryArray[i].getValue();
          V oldValue = delegateMap.put(key, value);
          if (oldValue != null) {
            if (throwIfDuplicateKeys) {
              throw conflictException("key", entryArray[i], entryArray[i].getKey() + "=" + oldValue);
            }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Nov 30 21:54:06 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/RegularImmutableMap.java

       * the entries in entryArray with its own entry objects (though they will have the same key/value
       * contents), and may take ownership of entryArray.
       */
      static <K, V> ImmutableMap<K, V> fromEntryArray(
          int n, @Nullable Entry<K, V>[] entryArray, boolean throwIfDuplicateKeys) {
        checkPositionIndex(n, entryArray.length);
        if (n == 0) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 28 18:11:09 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/JdkBackedImmutableBiMap.java

        Map<K, V> forwardDelegate = Maps.newHashMapWithExpectedSize(n);
        Map<V, K> backwardDelegate = Maps.newHashMapWithExpectedSize(n);
        for (int i = 0; i < n; i++) {
          // requireNonNull is safe because the first `n` elements have been filled in.
          Entry<K, V> e = RegularImmutableMap.makeImmutable(requireNonNull(entryArray[i]));
          entryArray[i] = e;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 28 18:11:09 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/RegularImmutableMultiset.java

          }
          hashCode += hash ^ count;
          entryArray[index++] = newEntry;
          hashTable[bucket] = newEntry;
          size += count;
        }
    
        return hashFloodingDetected(hashTable)
            ? JdkBackedImmutableMultiset.create(ImmutableList.asImmutableList(entryArray))
            : new RegularImmutableMultiset<E>(
                entryArray, hashTable, Ints.saturatedCast(size), hashCode, null);
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/RegularImmutableBiMap.java

        checkPositionIndex(n, entryArray.length);
        int tableSize = Hashing.closedTableSize(n, MAX_LOAD_FACTOR);
        int mask = tableSize - 1;
        @Nullable ImmutableMapEntry<K, V>[] keyTable = createEntryArray(tableSize);
        @Nullable ImmutableMapEntry<K, V>[] valueTable = createEntryArray(tableSize);
        /*
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ImmutableBiMap.java

        Entry<K, V>[] entryArray = (Entry<K, V>[]) Iterables.toArray(entries, EMPTY_ENTRY_ARRAY);
        switch (entryArray.length) {
          case 0:
            return of();
          case 1:
            Entry<K, V> entry = entryArray[0];
            return of(entry.getKey(), entry.getValue());
          default:
            /*
             * The current implementation will end up using entryArray directly, though it will write
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Oct 31 16:03:42 UTC 2023
    - 22.6K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/ImmutableSortedMap.java

        // long as no one can ever cast that same array instance back to a
        // raw type.
        @SuppressWarnings("unchecked")
        Entry<K, V>[] entryArray = (Entry[]) Iterables.toArray(entries, EMPTY_ENTRY_ARRAY);
        return fromEntries(comparator, sameComparator, entryArray, entryArray.length);
      }
    
      @SuppressWarnings("nullness") // TODO: b/316358623 - Remove after checker fix.
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 50.3K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

        // long as no one can ever cast that same array instance back to a
        // raw type.
        @SuppressWarnings("unchecked")
        Entry<K, V>[] entryArray = (Entry[]) Iterables.toArray(entries, EMPTY_ENTRY_ARRAY);
        return fromEntries(comparator, sameComparator, entryArray, entryArray.length);
      }
    
      @SuppressWarnings("nullness") // TODO: b/316358623 - Remove after checker fix.
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Sun Jun 02 13:36:19 UTC 2024
    - 53K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/ImmutableMap.java

        Entry<K, V>[] entryArray = (Entry<K, V>[]) Iterables.toArray(entries, EMPTY_ENTRY_ARRAY);
        switch (entryArray.length) {
          case 0:
            return of();
          case 1:
            // requireNonNull is safe because the first `size` elements have been filled in.
            Entry<K, V> onlyEntry = requireNonNull(entryArray[0]);
            return of(onlyEntry.getKey(), onlyEntry.getValue());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Apr 30 14:39:16 UTC 2024
    - 44.6K bytes
    - Viewed (0)
  10. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableMap.java

          default:
            @SuppressWarnings("unchecked") // TODO(cpovirk): Consider storing an Entry<?, ?>[].
            Entry<K, V>[] entryArray = entries.toArray((Entry<K, V>[]) new Entry<?, ?>[entries.size()]);
            return new RegularImmutableMap<K, V>(throwIfDuplicateKeys, entryArray);
        }
      }
    
      public static <K, V> ImmutableMap<K, V> copyOf(Map<? extends K, ? extends V> map) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 27 19:19:19 UTC 2024
    - 17.1K bytes
    - Viewed (0)
Back to top