/** * Convenience version of {@link #addAndGet(long, long)} (key, -1). * * @param key for the counter. * @return the new value. */ public long decrementAndGet(final long key) { return addAndGet(key, -1); }
/** * Convenience version of {@link #addAndGet(long, long)} (key, 1). * * @param key for the counter. * @return the new value. */ public long incrementAndGet(final long key) { return addAndGet(key, 1); }