Code example for TreeSet

Methods: clear

0
        mContext.unregisterReceiver(this);
        if (mPendingIntent != null) {
            mAlarmManager.cancel(mPendingIntent);
            mPendingIntent = null;
        } 
        mEventQueue.clear();
        mEventQueue = null;
    } 
 
    private boolean stopped() { 
        if (mEventQueue == null) {
            Log.w(TAG, "Timer stopped");
            return true; 
        } else { 
            return false; 
        } 
    } 
 
    private void cancelAlarm() { 
        mAlarmManager.cancel(mPendingIntent);
        mPendingIntent = null;