Increments by one the value currently associated with key, and returns the old value.
(K key)
| 148 | */ |
| 149 | |
| 150 | @CanIgnoreReturnValue |
| 151 | public long getAndIncrement(K key) { |
| 152 | return getAndAdd(key, 1); |
| 153 | } |
| 154 | |
| 155 | /** |
| 156 | * Decrements by one the value currently associated with {@code key}, and returns the old value. |