Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for oldCount (0.13 sec)

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

        Count frequency = backingMap.get(element);
        int oldCount;
        if (frequency == null) {
          oldCount = 0;
          backingMap.put(element, new Count(occurrences));
        } else {
          oldCount = frequency.get();
          long newCount = (long) oldCount + (long) occurrences;
          checkArgument(newCount <= Integer.MAX_VALUE, "too many occurrences: %s", newCount);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  2. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 15:26:39 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  3. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  4. 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
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Multisets.java

          Multiset<E> self, @ParametricNullness E element, int oldCount, int newCount) {
        checkNonnegative(oldCount, "oldCount");
        checkNonnegative(newCount, "newCount");
    
        if (self.count(element) == oldCount) {
          self.setCount(element, newCount);
          return true;
        } else {
          return false;
        }
      }
    
      static <E extends @Nullable Object> Iterator<E> elementIterator(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/Multisets.java

          Multiset<E> self, @ParametricNullness E element, int oldCount, int newCount) {
        checkNonnegative(oldCount, "oldCount");
        checkNonnegative(newCount, "newCount");
    
        if (self.count(element) == oldCount) {
          self.setCount(element, newCount);
          return true;
        } else {
          return false;
        }
      }
    
      static <E extends @Nullable Object> Iterator<E> elementIterator(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  7. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  8. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 12 15:26:39 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  9. 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
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:05:46 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  10. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Jun 17 14:40:53 UTC 2023
    - 19.7K bytes
    - Viewed (0)
Back to top