Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 32 for newCount (0.16 seconds)

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

        checkNonnegative(oldCount, "oldCount");
        checkNonnegative(newCount, "newCount");
        int entryIndex = backingMap.indexOf(element);
        if (entryIndex == -1) {
          if (oldCount != 0) {
            return false;
          }
          if (newCount > 0) {
            backingMap.put(element, newCount);
            size += newCount;
          }
          return true;
        }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Dec 05 23:15:58 GMT 2025
    - 7.9K bytes
    - Click Count (0)
  2. guava/src/com/google/common/collect/ConcurrentHashMultiset.java

        AtomicInteger existingCounter = safeGet(countMap, element);
        if (existingCounter == null) {
          if (expectedOldCount != 0) {
            return false;
          } else if (newCount == 0) {
            return true;
          } else {
            // if our write lost the race, it must have lost to a nonzero value, so we can stop
            return countMap.putIfAbsent(element, new AtomicInteger(newCount)) == null;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Dec 26 20:08:09 GMT 2025
    - 22.3K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/collect/TreeMultiset.java

      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);
            }
            return true;
          } else {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 13:11:08 GMT 2026
    - 34K bytes
    - Click Count (0)
  4. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

        AtomicInteger existingCounter = safeGet(countMap, element);
        if (existingCounter == null) {
          if (expectedOldCount != 0) {
            return false;
          } else if (newCount == 0) {
            return true;
          } else {
            // if our write lost the race, it must have lost to a nonzero value, so we can stop
            return countMap.putIfAbsent(element, new AtomicInteger(newCount)) == null;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Dec 26 20:08:09 GMT 2025
    - 22.3K bytes
    - Click Count (0)
  5. guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java

         *     method will return {@code true} if the condition was met.
         * @throws IllegalArgumentException if {@code oldCount} or {@code newCount} is negative
         */
        @Override
        public boolean setCount(E element, int oldCount, int newCount) {
          checkNonnegative(oldCount, "oldCount");
          checkNonnegative(newCount, "newCount");
          if (newCount == 0) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Jul 14 14:44:08 GMT 2025
    - 16.6K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/collect/EnumMultiset.java

          return count(element);
        }
        int index = element.ordinal();
        int oldCount = counts[index];
        long newCount = (long) oldCount + occurrences;
        checkArgument(newCount <= Integer.MAX_VALUE, "too many occurrences: %s", newCount);
        counts[index] = (int) newCount;
        if (oldCount == 0) {
          distinctElements++;
        }
        size += occurrences;
        return oldCount;
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 9K bytes
    - Click Count (0)
  7. android/guava/src/com/google/common/cache/LocalCache.java

          lock();
          try {
            long now = map.ticker.read();
            preWriteCleanup(now);
    
            int newCount = this.count + 1;
            if (newCount > this.threshold) { // ensure capacity
              expand();
              newCount = this.count + 1;
            }
    
            AtomicReferenceArray<ReferenceEntry<K, V>> table = this.table;
            int index = hash & (table.length() - 1);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 143.5K bytes
    - Click Count (0)
  8. guava/src/com/google/common/collect/MapMakerInternalMap.java

        @Nullable V put(K key, int hash, V value, boolean onlyIfAbsent) {
          lock();
          try {
            preWriteCleanup();
    
            int newCount = this.count + 1;
            if (newCount > this.threshold) { // ensure capacity
              expand();
              newCount = this.count + 1;
            }
    
            AtomicReferenceArray<E> table = this.table;
            int index = hash & (table.length() - 1);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 89.9K bytes
    - Click Count (0)
  9. guava/src/com/google/common/collect/EnumMultiset.java

          return count(element);
        }
        int index = element.ordinal();
        int oldCount = counts[index];
        long newCount = (long) oldCount + occurrences;
        checkArgument(newCount <= Integer.MAX_VALUE, "too many occurrences: %s", newCount);
        counts[index] = (int) newCount;
        if (oldCount == 0) {
          distinctElements++;
        }
        size += occurrences;
        return oldCount;
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 9.3K bytes
    - Click Count (0)
  10. android/guava/src/com/google/common/collect/MapMakerInternalMap.java

        @Nullable V put(K key, int hash, V value, boolean onlyIfAbsent) {
          lock();
          try {
            preWriteCleanup();
    
            int newCount = this.count + 1;
            if (newCount > this.threshold) { // ensure capacity
              expand();
              newCount = this.count + 1;
            }
    
            AtomicReferenceArray<E> table = this.table;
            int index = hash & (table.length() - 1);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 89.9K bytes
    - Click Count (0)
Back to Top