Code example for TreeMap

Methods: clear, putAll, values

0
			return; 
		} 
		inited = true;
		ProfileDBLineHandler lh = runProfileDb(new ArrayList<String>(
				Arrays.asList(new String[] { "-g", "+" })));
		vendors.clear();
		vendors.putAll(lh.result.families);
		capabilities.addAll(lh.result.capabilities);
		permissions.addAll(lh.result.permissions);
		capabilitiesForProfiles = lh.result.capabilitiesForProfiles;
		// Ok, give us some mappings! 
		ProfileDBResult matchResult = match("+", new String[0], new String[0]);
		profilesForRuntime = matchResult.profilesForRuntime;
	} 
 
	public static boolean isAvailable() { 
		return getTool().toFile().exists(); 
	} 
 
	private static IPath getTool() { 
		IPath profiledb = MoSyncTool.getDefault().getBinary("profiledb");
		return profiledb;
	} 
 
	private ProfileDBLineHandler runProfileDb(List<String> args) {
		CountDownLatch done = new CountDownLatch(1);
 
		IPath profiledb = getTool();
 
		CommandLineExecutor profileDbExe = new CommandLineExecutor(
				CoreMoSyncPlugin.LOG_CONSOLE_NAME); 
 
		ProfileDBLineHandler lh = new ProfileDBLineHandler(done,
				new ProfileDBResult()); 
		profileDbExe.setLineHandlers(lh, null);
 
		try { 
			ArrayList<String> cmdLine = new ArrayList<String>();
			cmdLine.add(profiledb.toOSString());
			cmdLine.addAll(args);
			profileDbExe.runCommandLine(cmdLine.toArray(new String[0]));
		} catch (Exception e) {
			// Then validate will kick in and notify the user! 
			CoreMoSyncPlugin.getDefault().log(e);
		} 
 
		try { 
			done.await(5, TimeUnit.SECONDS);
		} catch (InterruptedException e) {
			// Ignore. 
			Thread.currentThread().interrupt();
		} 
		return lh;
	} 
 
	@Override 
	public IVendor[] getVendors() { 
		init(); 
		return vendors.values().toArray(new IVendor[0]);
	} 
 
	@Override 
	public IVendor getVendor(String vendorName) {
		init();