Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for removeExactly (0.1 sec)

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

        assertThrows(IllegalArgumentException.class, () -> cms.removeExactly("a", -2));
    
        assertTrue(cms.removeExactly("a", 0));
        assertEquals(2, cms.count("a"));
        assertTrue(cms.removeExactly("c", 0));
        assertEquals(0, cms.count("c"));
    
        assertFalse(cms.removeExactly("a", 4));
        assertEquals(2, cms.count("a"));
        assertTrue(cms.removeExactly("a", 2));
        assertEquals(0, cms.count("a"));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 14.2K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java

        assertThrows(IllegalArgumentException.class, () -> cms.removeExactly("a", -2));
    
        assertTrue(cms.removeExactly("a", 0));
        assertEquals(2, cms.count("a"));
        assertTrue(cms.removeExactly("c", 0));
        assertEquals(0, cms.count("c"));
    
        assertFalse(cms.removeExactly("a", 4));
        assertEquals(2, cms.count("a"));
        assertTrue(cms.removeExactly("a", 2));
        assertEquals(0, cms.count("a"));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 14.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ConcurrentHashMultisetBasherTest.java

                  deltas[keyIndex] -= min(delta, oldValue);
                  break;
                }
              case REMOVE_EXACTLY:
                {
                  int delta = random.nextInt(5); // [0, 4]
                  if (multiset.removeExactly(key, delta)) {
                    deltas[keyIndex] -= delta;
                  }
                  break;
                }
            }
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

       * @return the count of the element before the operation; possibly zero
       * @throws IllegalArgumentException if {@code occurrences} is negative
       */
      /*
       * TODO(cpovirk): remove and removeExactly currently accept null inputs only
       * if occurrences == 0. This satisfies both NullPointerTester and
       * CollectionRemoveTester.testRemove_nullAllowed, but it's not clear that it's
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 21.1K bytes
    - Viewed (0)
Back to top