Code example for HashSet

Methods: isEmptyremove

0
        if (!mWakeLock.isHeld()) mWakeLock.acquire();
        if (DEBUG) Log.v(TAG, "acquire count=" + mHolders.size());
    } 
 
    synchronized void release(Object holder) {
        mHolders.remove(holder);
        if ((mWakeLock != null) && mHolders.isEmpty()
                && mWakeLock.isHeld()) {
            mWakeLock.release();
        } 
        if (DEBUG) Log.v(TAG, "release count=" + mHolders.size());
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java