Exemplo n.º 1
0
 /**
  * Utility method
  *
  * @param agentIDFactory
  * @param bootAgentNames
  * @return
  */
 public static <T> Map<AgentID, T> toAgentIDs(
     final ModelComponentIDFactory agentIDFactory, final Map<String, T> map) {
   final Map<AgentID, T> result = new HashMap<AgentID, T>();
   if (map != null && !map.isEmpty())
     for (Entry<String, T> entry : map.entrySet())
       result.put(agentIDFactory.createAgentID(entry.getKey()), entry.getValue());
   return result;
 }
Exemplo n.º 2
0
 /**
  * Utility method
  *
  * @param agentIDFactory
  * @param agentNames
  * @return
  */
 public static AgentID toAgentID(
     final ModelComponentIDFactory agentIDFactory, final String agentName) {
   return agentName == null ? null : agentIDFactory.createAgentID(agentName);
 }