Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for newValue (0.23 sec)

  1. android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java

                return delta;
              }
              // atomic replaced
              continue outer;
            }
    
            long newValue = oldValue + delta;
            if (atomic.compareAndSet(oldValue, newValue)) {
              return newValue;
            }
            // value changed
          }
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/MapMakerInternalMapTest.java

        assertEquals(0, segment.count);
    
        // same value
        segment.setTableEntryForTesting(index, entry);
        segment.count++;
        assertEquals(1, segment.count);
        assertSame(oldValue, segment.get(key, hash));
        assertTrue(segment.replace(key, hash, oldValue, newValue));
        assertEquals(1, segment.count);
        assertSame(newValue, segment.get(key, hash));
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 35.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/MapMakerInternalMapTest.java

        assertEquals(0, segment.count);
    
        // same value
        segment.setTableEntryForTesting(index, entry);
        segment.count++;
        assertEquals(1, segment.count);
        assertSame(oldValue, segment.get(key, hash));
        assertTrue(segment.replace(key, hash, oldValue, newValue));
        assertEquals(1, segment.count);
        assertSame(newValue, segment.get(key, hash));
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 35.1K bytes
    - Viewed (0)
  4. guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java

        doTestSet(e3());
      }
    
      private void doTestSet(E newValue) {
        int index = aValidIndex();
        E initialValue = getList().get(index);
        assertEquals(
            "set(i, x) should return the old element at position i.",
            initialValue,
            getList().set(index, newValue));
        assertEquals("After set(i, x), get(i) should return x", newValue, getList().get(index));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/AbstractContainerTester.java

       * iterator tests.
       *
       * @return the new container instance
       * @param newValue the new container instance
       */
      @CanIgnoreReturnValue
      protected C resetContainer(C newValue) {
        container = newValue;
        return container;
      }
    
      /**
       * @see #expectContents(java.util.Collection)
       * @param elements expected contents of {@link #container}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ConcurrentHashMultiset.java

          }
    
          while (true) {
            int oldValue = existingCounter.get();
            if (oldValue != 0) {
              try {
                int newValue = IntMath.checkedAdd(oldValue, occurrences);
                if (existingCounter.compareAndSet(oldValue, newValue)) {
                  // newValue can't == 0, so no need to check & remove
                  return oldValue;
                }
              } catch (ArithmeticException overflow) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/TableCollectors.java

        V oldValue = table.get(row, column);
        if (oldValue == null) {
          table.put(row, column, value);
        } else {
          V newValue = mergeFunction.apply(oldValue, value);
          if (newValue == null) {
            table.remove(row, column);
          } else {
            table.put(row, column, newValue);
          }
        }
      }
    
      private TableCollectors() {}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sat Mar 09 00:21:17 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  8. guava/src/com/google/common/cache/LocalCache.java

            }
    
            newValue = computingValueReference.compute(key, function);
            if (newValue != null) {
              if (valueReference != null && newValue == valueReference.get()) {
                computingValueReference.set(newValue);
                e.setValueReference(valueReference);
                recordWrite(e, 0, now); // no change in weight
                return newValue;
              }
              try {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 150.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/CollectCollectors.java

               * nullness checker.
               */
              K key = keyFunction.apply(t);
              V newValue = valueFunction.apply(t);
              accum.put(
                  checkNotNull(key, "Null key for input %s", t),
                  checkNotNull(newValue, "Null value for input %s", t));
            },
            EnumMapAccumulator::combine,
            EnumMapAccumulator::toImmutableMap,
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:21:40 GMT 2024
    - 17.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

          }
    
          while (true) {
            int oldValue = existingCounter.get();
            if (oldValue != 0) {
              try {
                int newValue = IntMath.checkedAdd(oldValue, occurrences);
                if (existingCounter.compareAndSet(oldValue, newValue)) {
                  // newValue can't == 0, so no need to check & remove
                  return oldValue;
                }
              } catch (ArithmeticException overflow) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 20.9K bytes
    - Viewed (0)
Back to top