All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.evuv.expressions.SmallerThanExpression Maven / Gradle / Ivy

The newest version!
package com.evuv.expressions;


import java.util.Map;

import com.evuv.exceptions.EventBindingException;
import com.evuv.operators.Operator;
import com.evuv.operators.SmallerThanOperator;

public class SmallerThanExpression extends BooleanExpression {

	protected SmallerThanOperator operator;
	
	
	public SmallerThanExpression(ComparableExpression left, ComparableExpression right) {
		super(left, right);
		operator = new SmallerThanOperator();
	}
	
	
	@Override
	public Boolean getValue() {
		return operator.op(left, right);
	}


	@SuppressWarnings("rawtypes")
	@Override
	protected Operator getOperator() {
		return operator;
	}
	
	@Override
	public SmallerThanExpression bind(Map event) throws EventBindingException {
		ComparableExpression bindedLeft = (ComparableExpression) left.bind(event);
		ComparableExpression bindedRight = (ComparableExpression) right.bind(event);
		return new SmallerThanExpression<>(bindedLeft, bindedRight);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy