20 import ca.uqac.lif.cep.functions.StreamVariable;
21 import ca.uqac.lif.cep.functions.Constant;
22 import ca.uqac.lif.cep.functions.FunctionException;
23 import ca.uqac.lif.cep.functions.FunctionTree;
24 import ca.uqac.lif.cep.util.Booleans;
25 import ca.uqac.lif.cep.util.Numbers;
42 public static void main(String[] args)
throws FunctionException
51 FunctionTree in_interval =
new FunctionTree(Booleans.and,
52 new FunctionTree(Numbers.isGreaterThan,
55 new FunctionTree(Numbers.isLessThan,
63 Object[] value =
new Object[1];
64 in_interval.evaluate(
new Integer[]{3}, value);
65 System.out.printf(
"Return value of the function: %b\n", value[0]);
66 in_interval.evaluate(
new Integer[]{1}, value);
67 System.out.printf(
"Return value of the function: %b\n", value[0]);
Creates a compound function (a FunctionTree) that checks if a number lies between two fixed bounds...