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.Turtle.class) {
throw new ArgumentTypeException
(context, this, i, Syntax.TurtleType() | Syntax.TurtlesetType(), elt);
}
for (AgentSet.Iterator iter = tempSet.iterator();
iter.hasNext();) {
resultSet.add((Turtle) iter.next());
}
} else if (elt instanceof LogoList) {
descendList(context, (LogoList) elt, resultSet);
} else if (elt instanceof Turtle) {
resultSet.add((Turtle) elt);
} else if (elt != org.nlogo.api.Nobody$.MODULE$) {
throw new ArgumentTypeException
(context, this, i, Syntax.TurtleType() | Syntax.TurtlesetType(), elt);
}
}
return new org.nlogo.agent.ArrayAgentSet(
org.nlogo.agent.Turtle.class,