Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getAndDecrement (0.07 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java

        assertEquals(0L, map.get(key));
        assertFalse(map.containsKey(key));
    
        assertEquals(0L, map.getAndDecrement(key));
        assertEquals(-1L, map.get(key));
    
        assertEquals(-1L, map.getAndIncrement(key));
        assertEquals(0L, map.get(key));
        assertTrue(map.containsKey(key));
    
        assertEquals(0L, map.getAndDecrement(key));
        assertEquals(-1L, map.get(key));
      }
    
      public void testAddAndGet() {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 17.5K bytes
    - Viewed (0)
  2. guava/src/com/google/common/util/concurrent/AtomicLongMap.java

        return getAndAdd(key, 1);
      }
    
      /**
       * Decrements by one the value currently associated with {@code key}, and returns the old value.
       */
      @CanIgnoreReturnValue
      public long getAndDecrement(K key) {
        return getAndAdd(key, -1);
      }
    
      /**
       * Adds {@code delta} to the value currently associated with {@code key}, and returns the old
       * value.
       */
      @CanIgnoreReturnValue
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri Oct 10 23:13:45 UTC 2025
    - 11.7K bytes
    - Viewed (0)
Back to top