public final long incrementAndGet(){
  for (; ; ) {
    long current=get();
    long next=current + 1;
    if (compareAndSet(current,next))     return next;
  }
}

public final long incrementAndGet ( ) { for ( ; ; ) { long current = get ( ) ; long next = current + 1 ; if ( compareAndSet ( current , next ) ) return next ; } }
atomically increments by one the current value .
