@Override
	public Object evaluate(Context context) {
		
		Iterator<Term> i = terms.iterator();
		
		Object value = i.next().operand.evaluate(context);
		
		while (i.hasNext()){
			Term next = i.next();
			switch (next.operator){
			case LT: value = Operations.lt(value, next.operand.evaluate(context)); break;
			case LE: value = Operations.le(value, next.operand.evaluate(context)); break;
			case GT: value = Operations.gt(value, next.operand.evaluate(context)); break;
			case GE: value = Operations.ge(value, next.operand.evaluate(context)); break;
			case EQ: value = Operations.eq(value, next.operand.evaluate(context)); break;
			case NE: value = Operations.eq(value, next.operand.evaluate(context)) == 1 ? 0 : 1; break;
			}
		}
		
		return value;
	}