Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 13 14:28:25 UTC 2024
    - 17.4K 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  3. android/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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 14.1K bytes
    - Viewed (0)
Back to top