Code example for HashSet

Methods: isEmpty, remove

0
  
		void removeFromView(View view) {
			// mViews can't be null because keep tags and set in sync 
			Task task = getTask(view);
			if (task == this) setTask(view, null);
			mViews.remove(view);
			if (mViews.isEmpty()) {
				cancel(); 
			} 
		} 
		 
		void removeFromViews() { 
			for (View view : mViews) {
				Task task = getTask(view);
				if (task == this) setTask(view, null);
			} 
			mViews.clear();
			cancel(); 
		} 
  
		// called to apply render to view