Code example for AtomicInteger

Methods: decrementAndGet

0
     * ¶ÔÎļþ¼õÉÙÒ»¸öÒýÓüÆÊý 
     *  
     * @return ¼õÉÙºóµÄÒýÓüÆÊý 
     */ 
    int decrement() { 
        return this.referenceCount.decrementAndGet();
    } 
 
 
    int decrement(final int n) {
        return this.referenceCount.addAndGet(-n);
    } 
 
 
    /** 
     * ÎļþÊÇ·ñ»¹ÔÚʹÓã¨ÒýÓüÆÊýÊÇ·ñÊÇ0ÁË£© 
     *  
     * @return ÎļþÊÇ·ñ»¹ÔÚʹÓà
     */ 
    boolean isUnUsed() { 
        return this.getReferenceCount() <= 0;