Atomically decrements by one the current value.

@return the previous value
192188
public BigInteger getAndDecrement() {
        while (true) {
        	BigInteger current = get();
        	BigInteger next = current.subtract(BigInteger.ONE);
            if (compareAndSet(current, next))
                return current;
        }
    }
845438
private void nextValue() {
		while (iterator.hasNext()) {
			nextValue = iterator.next();
			if (nextValue.isExpired() == false) {
				return;
			}
		}
		nextValue = null;
	}
111356
public V next() {

        Collection<? extends V> collection = this.collection;
        V offset = this.offset;

        if (offset != null) {
            boolean accept = false;
            for (V element : collection) {
                if (element == offset) {
                    accept = true;
                    continue;
                }

                if (accept) {
                    return this.offset = element;
                }
            }
        }

        return this.offset = collection.iterator().next();
    }
481753
public synchronized T next() {
	if (current == null) {
	    throw new NoSuchElementException();
	}
	T t = current.next();
        // Once an element has been drawn from the iterator, the current
        // iterator should be used for any subsequent remove call.
        if (toRemoveFrom != current)
            toRemoveFrom = current;
	advance();
	return t;
    }
561055
public long getNextUniqueTransactionId() {
        // get the current time, usually the salt value is zero
        // in testing it is used to simulate clock skew
        long currentTime = m_clock.get() + m_timestampTestingSalt;
        if (currentTime == lastUsedTime) {
            // increment the counter for this millisecond
            counterValue++;

            // handle the case where we've run out of counter values
            // for this particular millisecond (feels unlikely)
            if (counterValue > COUNTER_MAX_VALUE) {
                // spin until the next millisecond
                while (currentTime == lastUsedTime) {
                    currentTime = m_clock.get();
                }
                // reset the counter and lastUsedTime for the new millisecond
                lastUsedTime = currentTime;
                counterValue = 0;
            }
        }
        else {
            // reset the counter and lastUsedTime for the new millisecond
            if (currentTime < lastUsedTime) {
                VoltLogger log = new VoltLogger("HOST");
                double diffSeconds = (lastUsedTime - currentTime) / 1000.0;
                String msg = String.format("Initiator time moved backwards from: %d to %d, a difference of %.2f seconds.",
                        lastUsedTime, currentTime, diffSeconds);
                log.error(msg);
                System.err.println(msg);
                // if the diff is less than some specified amount of time, wait a bit
                if ((lastUsedTime - currentTime) < BACKWARD_TIME_FORGIVENESS_WINDOW_MS) {
                    log.info("This node will delay any stored procedures sent to it.");
                    log.info(String.format("This node will resume full operation in  %.2f seconds.", diffSeconds));

                    long count = BACKWARD_TIME_FORGIVENESS_WINDOW_MS;
                    // note, the loop should stop once lastUsedTime is PASSED, not current
                    while ((currentTime <= lastUsedTime) && (count-- > 0)) {
                        try {
                            m_clock.sleep(1);
                        } catch (InterruptedException e) {}
                        currentTime = m_clock.get();
                    }
                    // if the loop above ended because it ran too much
                    if (count < 0) {
                        org.voltdb.VoltDB.crashLocalVoltDB(
                              "VoltDB was unable to recover after the system time was externally negatively adusted. " +
                               "It is possible that there is a serious system time or NTP error. ", false, null);
                    }
                }
                // crash immediately if time has gone backwards by too much
                else {
                    org.voltdb.VoltDB.crashLocalVoltDB(
                            String.format("%.2f is larger than the max allowable number of seconds that " +
                                    "the clock can be negatively adjusted (%d)",
                                diffSeconds, BACKWARD_TIME_FORGIVENESS_WINDOW_MS / 1000), false, null);
                }
            }
            lastUsedTime = currentTime;
            counterValue = 0;
        }

        lastTxnId = makeIdFromComponents(currentTime, counterValue, initiatorId);

        return lastTxnId;
    }
1297026
public T pop()
    {
        T val = beginChunk.values[beginPos];
        beginChunk.values[beginPos] = null;
        beginPos++;
        if (beginPos == size) {
            beginChunk = beginChunk.next;
            beginChunk.prev = null;
            beginPos = 0;
        }
        return val;
    }
1288613
public int first() {
        long remaining;
        long next;

        remaining = data;
        while (true) {
            next = remaining / BASE;
            if (next == 0) {
                return (int) remaining - 1;
            }
            remaining = next;
        }
    }
398603
public double count() {
        T obj2 = ref.get();
        if (obj2 != null) {
            long prevLast = lastCount;
            lastCount = Math.max(countFunction.applyAsLong(obj2), 0);
            count.getCurrent().add(lastCount - prevLast);
        }
        return count.poll();
    }
1275174
public int incrementCount() {
        // get the logging recursion stack depth for the current thread
        int depth = stackDepth.get();
        depth = depth + 1;
        stackDepth.set(depth);
        return depth;
    }
790016
public Node previousSibling() {

		if (currentNode == null)
			return null;

		Node node = getPreviousSibling(currentNode);
		if (node != null)
			currentNode = node;

		return node;
	}
747953
public BigInteger incrementAndGet() {
        for (;;) {
        	BigInteger current = get();
        	BigInteger next = current.add(BigInteger.ONE);
            if (compareAndSet(current, next))
                return next;
        }
    }
897342
public int[] next()
    {
        boolean hasNewPerm = false;

        escape:while( level >= 0) {
//            boolean foundZero = false;
            for( int i = iter[level]; i < data.length; i = iter[level] ) {
                iter[level]++;

                if( data[i] == -1 ) {
                    level++;
                    data[i] = level-1;

                    if( level >= data.length ) {
                        // a new permutation has been created return the results.
                        hasNewPerm = true;
                        System.arraycopy(data,0,ret,0,ret.length);
                        level = level-1;
                        data[i] = -1;
                        break escape;
                    } else {
                        valk[level] = i;
                    }
                }
            }

            data[valk[level]] = -1;
            iter[level] = 0;
            level = level-1;

        }

        if( hasNewPerm )
            return ret;
        return null;
    }
1308938
public java.lang.String getOldValue() {
    java.lang.Object ref = oldValue_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      oldValue_ = s;
      return s;
    }
  }
1000655
public static Object previous(Enum self) {
        final Method[] methods = self.getClass().getMethods();
        for (Method method : methods) {
            if (method.getName().equals("previous") && method.getParameterTypes().length == 0) {
                return InvokerHelper.invokeMethod(self, "previous", NO_ARGS);
            }
        }
        Object[] values = (Object[]) InvokerHelper.invokeStaticMethod(self.getClass(), "values", NO_ARGS);
        int index = Arrays.asList(values).indexOf(self);
        return values[index > 0 ? index - 1 : values.length - 1];
    }
284145
public long getLastAccessedTime() {
        if (!_iSess.isValid())
            throw new IllegalStateException();
        long value = 0;
        if (_iSess != null) {
            value = _iSess.getLastAccessedTime();
        }
        return value;
    }
65863
private long incrementTerm() {
    counters.compute(clusterMembershipService.getLocalMember().id(), (id, value) -> value != null ? value + 1 : 1);
    broadcastCounters();
    return currentTerm();
  }
557748
public static boolean decrement(byte[] value) {
        for (int i=value.length; --i>=0; ) {
            byte newValue = (byte) ((value[i] & 0xff) + -1);
            value[i] = newValue;
            if (newValue != -1) {
                // No borrow bit, so done subtracting.
                return true;
            }
        }
        // This point is reached upon overflow.
        return false;
    }