Package org.apache.dubbo.common.utils
Class AtomicPositiveInteger
java.lang.Object
java.lang.Number
org.apache.dubbo.common.utils.AtomicPositiveInteger
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intaddAndGet(int delta) bytefinal booleancompareAndSet(int expect, int update) final intdoublebooleanfloatfinal intget()final intgetAndAdd(int delta) final intfinal intfinal intgetAndSet(int newValue) inthashCode()final intintintValue()longfinal voidset(int newValue) shorttoString()final booleanweakCompareAndSet(int expect, int update)
-
Constructor Details
-
AtomicPositiveInteger
public AtomicPositiveInteger() -
AtomicPositiveInteger
public AtomicPositiveInteger(int initialValue)
-
-
Method Details
-
getAndIncrement
public final int getAndIncrement() -
getAndDecrement
public final int getAndDecrement() -
incrementAndGet
public final int incrementAndGet() -
decrementAndGet
public final int decrementAndGet() -
get
public final int get() -
set
public final void set(int newValue) -
getAndSet
public final int getAndSet(int newValue) -
getAndAdd
public final int getAndAdd(int delta) -
addAndGet
public final int addAndGet(int delta) -
compareAndSet
public final boolean compareAndSet(int expect, int update) -
weakCompareAndSet
public final boolean weakCompareAndSet(int expect, int update) -
byteValue
public byte byteValue() -
shortValue
public short shortValue()- Overrides:
shortValuein classNumber
-
intValue
public int intValue() -
longValue
public long longValue() -
floatValue
public float floatValue()- Specified by:
floatValuein classNumber
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein classNumber
-
toString
-
hashCode
public int hashCode() -
equals
-