for (int i = 0; i < args.length; i++) {
Object elt = args[i].report(context);
if (elt instanceof AgentSet) {
AgentSet tempSet = (AgentSet) elt;
if (tempSet.type() != org.nlogo.agent.Patch.class) {
throw new ArgumentTypeException
(context, this, i, Syntax.PatchType() | Syntax.PatchsetType(), elt);
}
for (AgentSet.Iterator iter = tempSet.iterator(); iter.hasNext();) {
resultSet.add((Patch) iter.next());
}
} else if (elt instanceof LogoList) {
descendList(context, (LogoList) elt, resultSet);
} else if (elt instanceof Patch) {
resultSet.add((Patch) elt);
} else if (elt != org.nlogo.api.Nobody$.MODULE$) {
throw new ArgumentTypeException
(context, this, i, Syntax.PatchType() | Syntax.PatchsetType(), elt);
}
}
return new org.nlogo.agent.ArrayAgentSet(
org.nlogo.agent.Patch.class,