throw new TemplateModelException("Expecting exactly one argument for ?seq_contains(...)");
}
TemplateModel compareToThis = (TemplateModel) args.get(0);
final ModelComparator modelComparator = new ModelComparator(Environment.getCurrentEnvironment());
if (collection != null) {
TemplateModelIterator tmi = collection.iterator();
while (tmi.hasNext()) {
if (modelComparator.modelsEqual(tmi.next(), compareToThis)) {
return TemplateBooleanModel.TRUE;
}
}
return TemplateBooleanModel.FALSE;
}