Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for buildKeepingLast (0.07 sec)

  1. android/guava-tests/test/com/google/common/collect/ImmutableMapTest.java

        assertMapEquals(
            builder.buildKeepingLast(), "three", 3, "one", 1, "five", 5, "four", 4, "two", 2);
        IllegalArgumentException expected =
            assertThrows(IllegalArgumentException.class, () -> builder.buildOrThrow());
        // We don't really care which values the exception message contains, but they should be
        // different from each other. If buildKeepingLast() collapsed duplicates, that might end up not
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 36.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/ImmutableMap.java

        @Nullable Comparator<? super V> valueComparator;
        @Nullable Object[] alternatingKeysAndValues;
        int size;
        boolean entriesUsed;
    
        /**
         * If non-null, a duplicate key we found in a previous buildKeepingLast() or buildOrThrow()
         * call. A later buildOrThrow() can simply report this duplicate immediately.
         */
        @Nullable DuplicateKey duplicateKey;
    
        /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 41.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/RegularImmutableMap.java

      /*
       * We have some considerable complexity in these create methods because of
       * Builder.buildKeepingLast(). The same Builder might be called with buildKeepingLast() and then
       * buildOrThrow(), or vice versa. So in particular, if we modify alternatingKeysAndValues to
       * eliminate duplicate keys (for buildKeepingLast()) then we have to ensure that a later call to
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 22.5K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/ImmutableMap.java

            entriesUsed = false;
          }
        }
    
        /**
         * Associates {@code key} with {@code value} in the built map. If the same key is put more than
         * once, {@link #buildOrThrow} will fail, while {@link #buildKeepingLast} will keep the last
         * value put for that key.
         */
        @CanIgnoreReturnValue
        public Builder<K, V> put(K key, V value) {
          ensureCapacity(size + 1);
          Entry<K, V> entry = entryOf(key, value);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 44.3K bytes
    - Viewed (0)
  5. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableMap.java

          return build(/* throwIfDuplicateKeys= */ true);
        }
    
        public ImmutableMap<K, V> buildKeepingLast() {
          if (valueComparator != null) {
            // Probably not worth supporting this in GWT
            throw new UnsupportedOperationException(
                "orderEntriesByValue + buildKeepingLast not supported under GWT");
          }
          return build(/* throwIfDuplicateKeys= */ false);
        }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Aug 06 18:32:41 UTC 2025
    - 16.7K bytes
    - Viewed (0)
  6. guava/src/com/google/common/reflect/Types.java

                // unusual execution environments where that might not be true.
              }
              builder.put(method.getName(), method);
            }
          }
          typeVariableMethods = builder.buildKeepingLast();
        }
    
        private final TypeVariableImpl<?> typeVariableImpl;
    
        TypeVariableInvocationHandler(TypeVariableImpl<?> typeVariableImpl) {
          this.typeVariableImpl = typeVariableImpl;
        }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Sep 03 14:03:14 UTC 2025
    - 23.5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ImmutableBiMap.java

         * @deprecated This method does not make sense for bimaps and should not be called.
         * @since 31.1
         */
        @DoNotCall
        @Deprecated
        @Override
        public ImmutableBiMap<K, V> buildKeepingLast() {
          throw new UnsupportedOperationException("Not supported for bimaps");
        }
      }
    
      /**
       * Returns an immutable bimap containing the same entries as {@code map}. If {@code map} somehow
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 22.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/reflect/Types.java

                // unusual execution environments where that might not be true.
              }
              builder.put(method.getName(), method);
            }
          }
          typeVariableMethods = builder.buildKeepingLast();
        }
    
        private final TypeVariableImpl<?> typeVariableImpl;
    
        TypeVariableInvocationHandler(TypeVariableImpl<?> typeVariableImpl) {
          this.typeVariableImpl = typeVariableImpl;
        }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Sep 03 14:03:14 UTC 2025
    - 23.6K bytes
    - Viewed (0)
Back to top