Code example for TreeMap

Methods: keySet

0
	public Branches() { 
		this.branches = new TreeMap<String, Branch>();
	} 
	 
	public Set<String> getClients() {
		return branches.keySet();
	} 
	 
	public Branch getBranch(String client) {
		return getBranch(client, false);
	} 
	 
	public Branch getBranch(String client, boolean createIfNotExistant) {
		Branch branch = branches.get(client);
		 
		if (branch == null && createIfNotExistant) {
			branch = new Branch();
			branches.put(client, branch);
		} 
		 
		return branch;