18 #ifndef _DECAF_UTIL_CONCURRENT_ATOMIC_ATOMICINTEGER_H_ 19 #define _DECAF_UTIL_CONCURRENT_ATOMIC_ATOMICINTEGER_H_ 27 namespace concurrent {
74 void set(
int newValue ) {
75 this->value = newValue;
83 int getAndSet(
int newValue );
94 bool compareAndSet(
int expect,
int update );
100 int getAndIncrement();
106 int getAndDecrement();
113 int getAndAdd(
int delta );
119 int incrementAndGet();
125 int decrementAndGet();
132 int addAndGet(
int delta );
138 std::string toString()
const;
147 int intValue()
const;
156 long long longValue()
const;
165 float floatValue()
const;
174 double doubleValue()
const;
An int value that may be updated atomically.
Definition: AtomicInteger.h:37
The abstract class Number is the superclass of classes Byte, Double, Float, Integer, Long, and Short.
Definition: Number.h:35
#define DECAF_API
Definition: Config.h:29
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25
virtual ~AtomicInteger()
Definition: AtomicInteger.h:60