Set unassignedAgents = new TreeSet(baseComponentComparator);
Set unassignedAgents; if (experiment.isInDatabase()) unassignedAgents = new TreeSet(dbBaseComponentComparator); else unassignedAgents = new TreeSet(builtInBaseComponentComparator);
  private void addUnassignedAgentsFromExperiment() {    Set unassignedAgents = new TreeSet(baseComponentComparator);    AgentComponent[] agents = experiment.getAgents();    NodeComponent[] nodes = experiment.getNodes();    unassignedAgents.addAll(Arrays.asList(agents));    for (int i = 0; i < nodes.length; i++)      unassignedAgents.removeAll(Arrays.asList(nodes[i].getAgents()));    DefaultTreeModel model = (DefaultTreeModel)agentTree.getModel();    DefaultMutableTreeNode root = (DefaultMutableTreeNode)model.getRoot();    Iterator iter = unassignedAgents.iterator();    while (iter.hasNext()) {      AgentComponent agentComponent = (AgentComponent)iter.next();      ConsoleTreeObject cto = new ConsoleTreeObject(agentComponent);      DefaultMutableTreeNode newNode =	new DefaultMutableTreeNode(cto, false);      model.insertNodeInto(newNode, root, root.getChildCount());    }  }