if (obj instanceof Patch) {
result.add((Patch) obj);
} else if (obj instanceof AgentSet) {
AgentSet tempSet = (AgentSet) obj;
if (tempSet.type() != org.nlogo.agent.Patch.class) {
throw new EngineException(context, this,
I18N.errorsJ().getN("org.nlogo.prim.etc._patchset.listInputNonPatchAgentset",
this.displayName(), Dump.logoObject(tempList, true, false), Dump.logoObject(obj, true, false)));
}
for (AgentSet.Iterator iter2 = tempSet.iterator();
iter2.hasNext();) {
result.add((Patch) iter2.next());
}
} else if (obj instanceof LogoList) {
descendList(context, (LogoList) obj, result);
} else if (obj != org.nlogo.api.Nobody$.MODULE$) {
throw new EngineException(context, this,
I18N.errorsJ().getN("org.nlogo.prim.etc._patchset.listInputNonPatch",
this.displayName(), Dump.logoObject(tempList, true, false), Dump.logoObject(obj, true, false)));
}
}
}