Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for setCounts (0.17 sec)

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

        }
    
        frequency.add(-numberRemoved);
        size -= numberRemoved;
        return oldCount;
      }
    
      // Roughly a 33% performance improvement over AbstractMultiset.setCount().
      @CanIgnoreReturnValue
      @Override
      public int setCount(@ParametricNullness E element, int count) {
        checkNonnegative(count, "count");
    
        Count existingCounter;
        int oldCount;
        if (count == 0) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Mar 06 16:06:58 GMT 2023
    - 10.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Multiset.java

       *     zero instead.
       */
      @CanIgnoreReturnValue
      int setCount(@ParametricNullness E element, int count);
    
      /**
       * Conditionally sets the count of an element to a new value, as described in {@link
       * #setCount(Object, int)}, provided that the element has the expected current count. If the
       * current count is not {@code oldCount}, no change is made.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sat Jun 17 14:40:53 GMT 2023
    - 19.7K bytes
    - Viewed (0)
  3. guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java

         *
         * @return the count of {@code element} in the multiset before this call
         * @throws IllegalArgumentException if {@code count} is negative
         */
        @Override
        public int setCount(E element, int count) {
          checkNonnegative(count, "count");
          return (count == 0) ? removeAllOccurrences(element) : unbox(countMap.put(element, count));
        }
    
        /**
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed May 09 15:17:25 GMT 2018
    - 16.6K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/ForwardingMultiset.java

      }
    
      @CanIgnoreReturnValue
      @Override
      public int setCount(@ParametricNullness E element, int count) {
        return delegate().setCount(element, count);
      }
    
      @CanIgnoreReturnValue
      @Override
      public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) {
        return delegate().setCount(element, oldCount, newCount);
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri May 12 15:26:39 GMT 2023
    - 10.4K bytes
    - Viewed (0)
  5. 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)
  6. android/guava-tests/test/com/google/common/collect/ForwardingMultisetTest.java

        @Override
        public int hashCode() {
          return standardHashCode();
        }
    
        @Override
        public boolean setCount(T element, int oldCount, int newCount) {
          return standardSetCount(element, oldCount, newCount);
        }
    
        @Override
        public int setCount(T element, int count) {
          return standardSetCount(element, count);
        }
    
        @Override
        public Set<T> elementSet() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 15:49:06 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top