Code example for HashMap

Methods: size

0
	} 
	return photos;
    } 
 
    public boolean hasSelectedItems() { 
	return tick.size() > 0;
    } 
 
    public int getSelectedItemsCount() { 
	return tick.size();
    } 
 
    public void toggleTick(int position) {
	if (tick.containsKey(position)) {
	    tick.remove(position);
	} else { 
	    tick.put(position, getItem(position));
	} 
	notifyDataSetChanged();
    } 
}