Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for oldCount (0.03 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/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)
  3. 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)
  4. 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/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)
  6. 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)
  7. 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)
  8. 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)
  9. android/guava/src/com/google/common/collect/TreeMultiset.java

      @CanIgnoreReturnValue
      @Override
      public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) {
        checkNonnegative(newCount, "newCount");
        checkNonnegative(oldCount, "oldCount");
        checkArgument(range.contains(element));
    
        AvlNode<E> root = rootReference.get();
        if (root == null) {
          if (oldCount == 0) {
            if (newCount > 0) {
              add(element, newCount);
            }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 33.8K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/ImmutableMultiset.java

       * @deprecated Unsupported operation.
       */
      @CanIgnoreReturnValue
      @Deprecated
      @Override
      @DoNotCall("Always throws UnsupportedOperationException")
      public final boolean setCount(E element, int oldCount, int newCount) {
        throw new UnsupportedOperationException();
      }
    
      @GwtIncompatible // not present in emulated superclass
      @Override
      int copyIntoArray(@Nullable Object[] dst, int offset) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 20.6K bytes
    - Viewed (0)
Back to top