Code example for HashMap

Methods: size

0
		return count;
	} 
 
	@Override 
	public Map<String, Contact> getContacts(int offset, int max_results, List<String> select, Map<String, Object> conditions) throws Exception {
		Map<String, Contact> contacts = new HashMap<String, Contact>();
		 
		Cursor cursor = cr.query(People.CONTENT_URI, null, null, null, null);
		try { 
			if (!cursor.moveToPosition(offset))
				return contacts;
			if (max_results == -1) {
				max_results = cursor.getCount() - offset;
			} 
			 
			do { 
				if(contacts.size() >= max_results) {
					break; 
				} 
				Contact contact = new Contact();
	 
				String id = cursor.getString(cursor.getColumnIndex(People._ID));