Code example for HashSet

Methods: isEmpty, remove, size

0
        Log.v(THIS_FILE, "acquire wakelock: holder count="
                + mHolders.size());
    } 
 
    public synchronized void release(Object holder) {
        mHolders.remove(holder);
        if ((mWakeLock != null) && mHolders.isEmpty()
                && mWakeLock.isHeld()) {
            mWakeLock.release();
        } 
         
        Log.v(THIS_FILE, "release wakelock: holder count="
                + mHolders.size());
    } 
}