Sha256: b76f2531806d94ddcdb3f5124ff7205e3dfc3802e5dc91001a85e0c963993802

Contents?: true

Size: 653 Bytes

Versions: 119

Compression:

Stored size: 653 Bytes

Contents

package j2me.util.concurrent.atomic;
public class AtomicLong  {
        private volatile long value;
        
    public AtomicLong(long initialValue) {
        value = initialValue;
    }
    public AtomicLong() {
    }
    public final long get() {
        return value;
    }
    public final void set(long newValue) {
        value = newValue;
    }

    public final long getAndIncrement() {
        while (true) {
            long current = get();
            long next = current + 1;
            set(next);
            //TODO: getAndIncrement
//            if (compareAndSet(current, next))
                return current;
        }
    }
    
}

Version data entries

119 entries across 119 versions & 1 rubygems

Version Path
rhodes-3.5.1.12 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.5 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.4.2 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.4 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.3 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.3.beta.4 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.3.beta.3 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.3.beta.2 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.3.beta.1 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.2 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.2.beta.7 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.2.beta.6 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.2.beta.5 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.2.beta.4 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.2.beta.3 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.2.beta.2 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.2.beta.1 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.1 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.0 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java
rhodes-3.3.0.beta.3 platform/bb/RubyVM/src/j2me/util/concurrent/atomic/AtomicLong.java