public abstract class AtomicCounter extends Object
| 构造器和说明 |
|---|
AtomicCounter() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract long |
get()
Gets the current count value.
|
abstract long |
getAndAdd(long delta)
Gets the current count value and then add specified number of delta.
|
long |
getAndIncrement()
Gets the current count value and then add one.
|
abstract void |
set(long newValue)
Sets a new value to count.
|
public abstract long get()
public abstract void set(long newValue)
newValue - the new valuepublic final long getAndIncrement()
public abstract long getAndAdd(long delta)
delta - the number of deltaCopyright © 2023. All rights reserved.