Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for setCount (0.19 sec)

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

                .build();
        assertEquals(HashMultiset.create(asList("b", "b", "b")), multiset);
      }
    
      public void testBuilderSetCountThenAdd() {
        ImmutableSortedMultiset<String> multiset =
            ImmutableSortedMultiset.<String>naturalOrder()
                .add("a")
                .setCount("a", 2)
                .setCount("b", 3)
                .setCount("a", 1)
                .add("a")
                .build();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 20:09:59 GMT 2024
    - 19.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/TreeMultiset.java

        }
        int[] result = new int[1]; // used as a mutable int reference to hold result
        AvlNode<E> newRoot = root.setCount(comparator(), element, count, result);
        rootReference.checkAndSet(root, newRoot);
        return result[0];
      }
    
      @CanIgnoreReturnValue
      @Override
      public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) {
        checkNonnegative(newCount, "newCount");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 34.2K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java

      }
    
      /** Call the {@code setCount()} method under test, and check its return value. */
      abstract void setCountCheckReturnValue(E element, int count);
    
      /**
       * Call the {@code setCount()} method under test, but do not check its return value. Callers
       * should use this method over {@link #setCountCheckReturnValue(Object, int)} when they expect
       * {@code setCount()} to throw an exception, as checking the return value could produce an
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/collect/testing/google/AbstractMultisetSetCountTester.java

      }
    
      /** Call the {@code setCount()} method under test, and check its return value. */
      abstract void setCountCheckReturnValue(E element, int count);
    
      /**
       * Call the {@code setCount()} method under test, but do not check its return value. Callers
       * should use this method over {@link #setCountCheckReturnValue(Object, int)} when they expect
       * {@code setCount()} to throw an exception, as checking the return value could produce an
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/ImmutableMultiset.java

         * @throws NullPointerException if {@code element} is null
         * @throws IllegalArgumentException if {@code count} is negative
         */
        @CanIgnoreReturnValue
        public Builder<E> setCount(E element, int count) {
          contents.setCount(checkNotNull(element), count);
          return this;
        }
    
        /**
         * Adds each element of {@code elements} to the {@code ImmutableMultiset}.
         *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 20.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Multisets.java

        @Override
        public void clear() {
          throw new UnsupportedOperationException();
        }
    
        @Override
        public int setCount(@ParametricNullness E element, int count) {
          throw new UnsupportedOperationException();
        }
    
        @Override
        public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) {
          throw new UnsupportedOperationException();
        }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/ImmutableSortedMultisetTest.java

      }
    
      public void testBuilderSetCount() {
        ImmutableSortedMultiset<String> multiset =
            ImmutableSortedMultiset.<String>naturalOrder()
                .add("a")
                .setCount("a", 2)
                .setCount("b", 3)
                .build();
        assertEquals(HashMultiset.create(asList("a", "a", "b", "b", "b")), multiset);
      }
    
      public void testBuilderAddHandlesNullsCorrectly() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 20:09:59 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/ImmutableMultisetTest.java

      }
    
      public void testBuilderSetCount() {
        ImmutableMultiset<String> multiset =
            new ImmutableMultiset.Builder<String>().add("a").setCount("a", 2).setCount("b", 3).build();
        assertEquals(HashMultiset.create(asList("a", "a", "b", "b", "b")), multiset);
      }
    
      public void testBuilderAddHandlesNullsCorrectly() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 21K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

       *
       * @return the count of {@code element} in the multiset before this call
       * @throws IllegalArgumentException if {@code count} is negative
       */
      @CanIgnoreReturnValue
      @Override
      public int setCount(E element, int count) {
        checkNotNull(element);
        checkNonnegative(count, "count");
        while (true) {
          AtomicInteger existingCounter = Maps.safeGet(countMap, element);
          if (existingCounter == null) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/ConcurrentHashMultiset.java

       *
       * @return the count of {@code element} in the multiset before this call
       * @throws IllegalArgumentException if {@code count} is negative
       */
      @CanIgnoreReturnValue
      @Override
      public int setCount(E element, int count) {
        checkNotNull(element);
        checkNonnegative(count, "count");
        while (true) {
          AtomicInteger existingCounter = Maps.safeGet(countMap, element);
          if (existingCounter == null) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 20.9K bytes
    - Viewed (0)
Back to top