class ConditionEvaluate {

	public boolean evaluate(List<String> row) throws ParseException {
		for (int i = 0; i < columnNames.length; i++) {
			jexlContext.set(columnNames[i], row.get(columnIndexes[i]));
		}
	    Object value;
	    try {
	    	value = expression.evaluate(jexlContext);
	    } catch (Exception e) {
	    	throw new ParseException("Cannot evaluate condition: " + expression.getSourceText() + ". " +
	    				e.getLocalizedMessage(), e);
	    }
		if (value instanceof Boolean) {
			return (Boolean)value;
		}
	    throw new ParseException("Invalid condition: " + expression.getSourceText());
	}

	public  ConditionEvaluate(List<String> columnNames, String condition);

}