Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for oldCount (0.04 sec)

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

        }
        int index = e.ordinal();
        int oldCount = counts[index];
        if (oldCount == 0) {
          return 0;
        } else if (oldCount <= occurrences) {
          counts[index] = 0;
          distinctElements--;
          size -= oldCount;
        } else {
          counts[index] = oldCount - occurrences;
          size -= occurrences;
        }
        return oldCount;
      }
    
      // Modification Operations
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetSetCountConditionallyTester.java

      private void assertSetCountNegativeOldCount() {
        try {
          getMultiset().setCount(e3(), -1, 1);
          fail("calling setCount() with a negative oldCount should throw IllegalArgumentException");
        } catch (IllegalArgumentException expected) {
        }
      }
    
      // Negative oldCount.
    
      @CollectionFeature.Require(SUPPORTS_ADD)
      public void testSetCountConditional_negativeOldCount_addSupported() {
        assertSetCountNegativeOldCount();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Nov 14 23:40:07 UTC 2024
    - 4K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/collect/testing/google/MultisetSetCountConditionallyTester.java

      private void assertSetCountNegativeOldCount() {
        try {
          getMultiset().setCount(e3(), -1, 1);
          fail("calling setCount() with a negative oldCount should throw IllegalArgumentException");
        } catch (IllegalArgumentException expected) {
        }
      }
    
      // Negative oldCount.
    
      @CollectionFeature.Require(SUPPORTS_ADD)
      public void testSetCountConditional_negativeOldCount_addSupported() {
        assertSetCountNegativeOldCount();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Nov 14 23:40:07 UTC 2024
    - 4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/FilteredEntryMultimap.java

          K k = (K) key;
          int oldCount = 0;
          Iterator<V> itr = collection.iterator();
          while (itr.hasNext()) {
            V v = itr.next();
            if (satisfies(k, v)) {
              oldCount++;
              if (oldCount <= occurrences) {
                itr.remove();
              }
            }
          }
          return oldCount;
        }
    
        @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ForwardingMultiset.java

        return delegate().setCount(element, count);
      }
    
      @CanIgnoreReturnValue
      @Override
      public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) {
        return delegate().setCount(element, oldCount, newCount);
      }
    
      /**
       * A sensible definition of {@link #contains} in terms of {@link #count}. If you override {@link
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/FilteredEntryMultimap.java

          K k = (K) key;
          int oldCount = 0;
          Iterator<V> itr = collection.iterator();
          while (itr.hasNext()) {
            V v = itr.next();
            if (satisfies(k, v)) {
              oldCount++;
              if (oldCount <= occurrences) {
                itr.remove();
              }
            }
          }
          return oldCount;
        }
    
        @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Multiset.java

       *     was indeed modified, unless {@code oldCount == newCount}.
       * @throws IllegalArgumentException if {@code oldCount} or {@code newCount} is negative
       * @throws NullPointerException if {@code element} is null and the implementation does not permit
       *     null elements. Note that if {@code oldCount} and {@code newCount} are both zero, the
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 19.5K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/Multiset.java

       *     was indeed modified, unless {@code oldCount == newCount}.
       * @throws IllegalArgumentException if {@code oldCount} or {@code newCount} is negative
       * @throws NullPointerException if {@code element} is null and the implementation does not permit
       *     null elements. Note that if {@code oldCount} and {@code newCount} are both zero, the
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 20.9K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetRemoveTester.java

        }
      }
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      public void testRemove_occurrences_0() {
        int oldCount = getMultiset().count(e0());
        assertEquals(
            "multiset.remove(E, 0) didn't return the old count",
            oldCount,
            getMultiset().remove(e0(), 0));
      }
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      public void testRemove_occurrences_negative() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 7K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/google/MultisetRemoveTester.java

        }
      }
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      public void testRemove_occurrences_0() {
        int oldCount = getMultiset().count(e0());
        assertEquals(
            "multiset.remove(E, 0) didn't return the old count",
            oldCount,
            getMultiset().remove(e0(), 0));
      }
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      public void testRemove_occurrences_negative() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 7K bytes
    - Viewed (0)
Back to top