Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for oldCount (0.09 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/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)
  3. 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. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

       */
      @CanIgnoreReturnValue
      @Override
      public boolean setCount(E element, int expectedOldCount, int newCount) {
        checkNotNull(element);
        checkNonnegative(expectedOldCount, "oldCount");
        checkNonnegative(newCount, "newCount");
    
        AtomicInteger existingCounter = safeGet(countMap, element);
        if (existingCounter == null) {
          if (expectedOldCount != 0) {
            return false;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Synchronized.java

            return delegate().setCount(element, count);
          }
        }
    
        @Override
        public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) {
          synchronized (mutex) {
            return delegate().setCount(element, oldCount, newCount);
          }
        }
    
        @Override
        public Set<E> elementSet() {
          synchronized (mutex) {
            if (elementSet == null) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 53.4K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/Synchronized.java

            return delegate().setCount(element, count);
          }
        }
    
        @Override
        public boolean setCount(@ParametricNullness E element, int oldCount, int newCount) {
          synchronized (mutex) {
            return delegate().setCount(element, oldCount, newCount);
          }
        }
    
        @Override
        public Set<E> elementSet() {
          synchronized (mutex) {
            if (elementSet == null) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 57.2K bytes
    - Viewed (0)
  8. compat/maven-embedder/src/test/java/org/apache/maven/cli/MavenCliTest.java

            PrintStream oldOut = System.out;
            System.setOut(new PrintStream(systemOut));
    
            // when
            try {
                cli.cli(cliRequest);
            } catch (MavenCli.ExitException exitException) {
                // expected
            } finally {
                // restore sysout
                System.setOut(oldOut);
            }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  9. compat/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java

         * @param stdout stdout
         * @param stderr stderr
         * @return return code
         */
        public int doMain(String[] args, String workingDirectory, PrintStream stdout, PrintStream stderr) {
            PrintStream oldout = System.out;
            PrintStream olderr = System.err;
    
            final Set<String> realms;
            if (classWorld != null) {
                realms = new HashSet<>();
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 76.8K bytes
    - Viewed (0)
Back to top