Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for buildKeepingLast (0.14 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 36.6K bytes
    - Viewed (0)
  2. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 41.1K 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 15 22:32:14 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ImmutableMap.java

        @CheckForNull 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 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/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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 44.6K 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 23K 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 22.2K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/ImmutableSortedMap.java

         */
        @DoNotCall
        @Deprecated
        @Override
        public final ImmutableSortedMap<K, V> buildKeepingLast() {
          // TODO(emcmanus): implement
          throw new UnsupportedOperationException(
              "ImmutableSortedMap.Builder does not yet implement buildKeepingLast()");
        }
      }
    
      private final transient RegularImmutableSortedSet<K> keySet;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 50.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

         */
        @DoNotCall
        @Deprecated
        @Override
        public final ImmutableSortedMap<K, V> buildKeepingLast() {
          // TODO(emcmanus): implement
          throw new UnsupportedOperationException(
              "ImmutableSortedMap.Builder does not yet implement buildKeepingLast()");
        }
      }
    
      private final transient RegularImmutableSortedSet<K> keySet;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 53K bytes
    - Viewed (0)
  10. 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");
        }
    
        @Override
        @VisibleForTesting
        ImmutableBiMap<K, V> buildJdkBacked() {
          checkState(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 22.6K bytes
    - Viewed (0)
Back to top