Atomically increments by one the current value.

@return the previous value
506622
public BigInteger getAndIncrement() {
        while (true) {
        	BigInteger current = get();
        	BigInteger next = current.add(BigInteger.ONE);
            if (compareAndSet(current, next))
                return current;
        }
    }
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];
    }
674921
public Object[] getCurrent() {

        if (currentPos < 0 || currentPos >= size) {
            return null;
        }

        if (currentPos == currentOffset + table.length) {
            getBlock(currentOffset + table.length);
        }

        return table[currentPos - currentOffset];
    }
1266683
public int incrementAndGet(T obj) {
        int prev, next;
        do {
            prev = get(obj);
            next = prev + 1;
        } while (!compareAndSet(obj, prev, next));
        return next;
    }
16549
public Revision next()
	{
		try {
			Revision revision = new Revision(result.getInt(2));

			this.primaryKey = result.getInt(1);
			revision.setPrimaryKey(this.primaryKey);

			revision.setRevisionID(result.getInt(3));
			revision.setArticleID(result.getInt(4));
			revision.setTimeStamp(new Timestamp(result.getLong(5)));
			revision.setFullRevisionID(result.getInt(6));

			return revision;

		}
		catch (Exception e) {

			e.printStackTrace();

			throw new RuntimeException(e);
		}
	}
120581
static final int nextSecondarySeed() {
        int r;
        Thread t = Thread.currentThread();
        if ((r = U.getInt(t, SECONDARY)) != 0) {
            r ^= r << 13;   // xorshift
            r ^= r >>> 17;
            r ^= r << 5;
        }
        else if ((r = mix32(seeder.getAndAdd(SEEDER_INCREMENT))) == 0)
            r = 1; // avoid zero
        U.putInt(t, SECONDARY, r);
        return r;
    }
1311800
public T remove() {
        final Node<T> previous = iterator.currentNode.previous;
        final T element = remove(iterator.currentNode);
        iterator.currentNode = previous;
        return element;
    }
1153182
public long nextLong() {
    Delta d = ranges.get();
    if (d.start <= d.stop) {
      mutex.lock();
      value = d.update(value);
      mutex.unlock();
    }
    return d.start++;
  }
883802
public int range() {
	// the current range isn't accurate, loop through the values and count
	if (recalculateRange) {
	    recalculateRange = false;
	    range = 0;
	    for (V v : values()) 
		range++;
	}
	return range;
    }
423804
public Versioned<E> previous() {
        if(hasPrevious()) {
            E resultValue = _previousNode.getValue().getValue();
            _lastId = _previousNode.getValue().getId();
            _lastCall = LastCall.PREVIOUS;
            _nextNode = _previousNode;
            _isNextSet = true;
            _isPreviousSet = false;
            return new Versioned<E>(resultValue, _previousNode.getVersion());
        } else {
            throw new NoSuchElementException();
        }
    }
1022922
public boolean hasChanged() {
        Object currentValue = getValue();
        return value == null || currentValue == null ? value != currentValue : !value.equals(currentValue);
    }
1288613
public int first() {
        long remaining;
        long next;

        remaining = data;
        while (true) {
            next = remaining / BASE;
            if (next == 0) {
                return (int) remaining - 1;
            }
            remaining = next;
        }
    }
808606
static final int nextSecondarySeed() {
    int r;
    if ((r = getThreadLocalRandomSecondarySeed()) != 0) {
      r ^= r << 13; // xorshift
      r ^= r >>> 17;
      r ^= r << 5;
    } else if ((r = mix32(seeder.getAndAdd(SEEDER_INCREMENT))) == 0) {
      r = 1; // avoid zero
    }
    setThreadLocalRandomSecondarySeed(r);
    return r;
  }
260505
public boolean next()
    {
        boolean ret = false;
        if (this.iterator == null) {
            this.iterator = this.objects.iterator();
        }
        if (this.iterator.hasNext()) {
            this.current = this.iterator.next();
            ret = true;
        }
        return ret;
    }
661395
public synchronized Entry previous()
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "previous");

//  can only do anything if the cursor is still pointing in to a list
    checkEntryParent();
  
    Entry previousEntry = null;
  
    synchronized(parentList)
    {
      //get the previous entry
      previousEntry = getPreviousEntry();
      //if it is null
      if(previousEntry == null)
      {
        //then hopefully we are at the top of the list
        if(current == parentList.first)
        {
          //so move the cursor to the top
          moveToTop();
        }
        else if(!atTop)
        {
          //it should not be possible for the previous entry to be null but the current
          //not be the first one in the list or already at the top
          SIErrorException e = new SIErrorException(
            nls.getFormattedMessage(
              "INTERNAL_MESSAGING_ERROR_CWSIP0002",
              new Object[] {
                "com.ibm.ws.sib.processor.utils.linkedlist.Cursor",
                "1:228:1.15" },
             null));
    
          FFDCFilter.processException(
            e,
            "com.ibm.ws.sib.processor.utils.linkedlist.Cursor.previous",
            "1:234:1.15",
            this);
      
          SibTr.exception(tc, e);      
    
          if (tc.isEntryEnabled())
            SibTr.exit(tc, "previous", e);
    
          throw e;
        }
      }
      else
      {
        //move the cursor to the previous entry
        moveCursor(previousEntry); 
      }
    }
  
    if (tc.isEntryEnabled())
      SibTr.exit(tc, "previous", previousEntry);

    return previousEntry;
  }
1022808
protected long elapsed ()
    {
        long current = current();
        if (_driftRatio != 1.0) {
            long elapsed = current - _priorCurrent;
            _startStamp += (elapsed - (elapsed * _driftRatio));
        }
        _priorCurrent = current;

        return current - _startStamp;
    }
462919
@Override
	public Long next() {
		if (!hasNext()) {
			throw new NoSuchElementException(toString() + " ended");
		}

		current = next;
		next = next + increment;

		return current();
	}