Collection<Predicate> predicates = new ArrayList<Predicate>();
for (Iterator iter = getIterator(rightValue); iter.hasNext();) {
Object o = iter.next();
if (o instanceof Function) {
predicates.add(new EqualsTestPredicate(new LiteralFunction(leftValue), Operator.EQUAL, (Function) o, getLine(), getColumn()));
} else {
predicates.add(new EqualsTestPredicate(new LiteralFunction(leftValue), Operator.EQUAL, new LiteralFunction(o), getLine(), getColumn()));
}
}
if (predicates.isEmpty()) {
throw new IllegalStateException("IN expression contains no elements!");