com.alibaba.dubbo.common.utils
Class AtomicPositiveInteger

java.lang.Object
  extended by java.lang.Number
      extended by com.alibaba.dubbo.common.utils.AtomicPositiveInteger
All Implemented Interfaces:
Serializable

public class AtomicPositiveInteger
extends Number

AtomicPositiveInteger

Author:
william.liangf, ding.lid
See Also:
Serialized Form

Constructor Summary
AtomicPositiveInteger()
           
AtomicPositiveInteger(int initialValue)
           
 
Method Summary
 int addAndGet(int delta)
           
 byte byteValue()
           
 boolean compareAndSet(int expect, int update)
           
 int decrementAndGet()
           
 double doubleValue()
           
 boolean equals(Object obj)
           
 float floatValue()
           
 int get()
           
 int getAndAdd(int delta)
           
 int getAndDecrement()
           
 int getAndIncrement()
           
 int getAndSet(int newValue)
           
 int hashCode()
           
 int incrementAndGet()
           
 int intValue()
           
 long longValue()
           
 void set(int newValue)
           
 short shortValue()
           
 String toString()
           
 boolean weakCompareAndSet(int expect, int update)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AtomicPositiveInteger

public AtomicPositiveInteger()

AtomicPositiveInteger

public AtomicPositiveInteger(int initialValue)
Method Detail

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()
Overrides:
byteValue in class Number

shortValue

public short shortValue()
Overrides:
shortValue in class Number

intValue

public int intValue()
Specified by:
intValue in class Number

longValue

public long longValue()
Specified by:
longValue in class Number

floatValue

public float floatValue()
Specified by:
floatValue in class Number

doubleValue

public double doubleValue()
Specified by:
doubleValue in class Number

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2012–2017 Alibaba. All rights reserved.