20 import ca.uqac.lif.cep.functions.Constant;
21 import ca.uqac.lif.cep.functions.Function;
22 import ca.uqac.lif.cep.functions.FunctionException;
31 public static void main(String[] args)
throws FunctionException
38 Function foo =
new Constant(
"foo");
42 Object[] values =
new Object[1];
43 foo.evaluate(null, values);
44 String s_value = (String) values[0];
45 System.out.printf(
"The value of foo is %s\n", s_value);
49 Function one =
new Constant(1);
50 one.evaluate(null, values);
51 int i_value = (Integer) values[0];
52 System.out.printf(
"The value of one is %d\n", i_value);
Basic usage of the ca.uqac.lif.cep.functions.Constant function.