Code example for TreeSet

Methods: add, addAll

0
		return host;
	} 
	 
	public Collection<CMISHost> getAllPreferences(Context ctx)
	{ 
		Collection<CMISHost> results = new TreeSet<CMISHost>();
		 
		Map<String, CMISHost> prefs = readPreferences(ctx);
		 
		if (prefs.size() == 0)
		{ 
			initDefaultPrefs(ctx);
			prefs = readPreferences(ctx);
		} 
		 
		if (prefs != null)
		{ 
			results.addAll(prefs.values());
			results.add(createAddServer(ctx));
		}		 
		 
		return results;
	}