![]() |
0.11.4
|
Public Member Functions | |
| Constant (Object value) | |
| Creates a new constant. | |
| void | evaluate (Object[] inputs, Object[] outputs, Context context, EventTracker tracker) |
| Evaluates the outputs of the function, given some inputs. | |
| void | evaluate (Object[] inputs, Object[] outputs) |
| Evaluates the outputs of the function, given some inputs. | |
| boolean | evaluatePartial (Object[] inputs, Object[] outputs, Context context) |
| Evaluates the outputs of the function, given some inputs. | |
| int | getInputArity () |
| Gets the function's input arity, i.e. | |
| int | getOutputArity () |
| Gets the function's output arity, i.e. | |
| void | reset () |
| Resets the function to its initial state. | |
| Constant | duplicate (boolean with_state) |
| Duplicates an object. | |
| void | getInputTypesFor (Set< Class<?> > classes, int index) |
| Populates the set of classes accepted by the function for its i-th input. | |
| Class<?> | getOutputTypeFor (int index) |
| Returns the type of the events produced by the function for its i-th output. | |
| String | toString () |
| Object | getValue () |
| Gets the actual object that this constant processor returns. | |
| Object | printState () |
| Constant | readState (Object o) |
| Public Member Functions inherited from ca.uqac.lif.cep.functions.Function | |
| void | evaluate (Object[] inputs, Object[] outputs, Context context) |
| Evaluates the outputs of the function, given some inputs. | |
| boolean | evaluateLazy (Object[] inputs, Object[] outputs) |
| Attempts a lazy evaluation of the function, given some inputs. | |
| final Function | duplicate () |
| Duplicates an object and sets it to its initial state. | |
| Object | print (ObjectPrinter<?> printer) |
| final Function | read (ObjectReader<?> reader, Object o) throws FunctionException |
| Reads the content of a function from a serialized object. | |
Static Public Attributes | |
| static final transient Constant | ZERO = new Constant(0) |
| A constant representing the number zero. | |
| static final transient Constant | ONE = new Constant(1) |
| A constant representing the number one. | |
| Static Public Attributes inherited from ca.uqac.lif.cep.functions.Function | |
| static final int | s_maxInputArity = 10 |
| The maximum input arity that a function can have. | |
| ca.uqac.lif.cep.functions.Constant.Constant | ( | Object | value | ) |
Creates a new constant.
| value | The value associated to this constant |
Definition at line 53 of file Constant.java.
| Constant ca.uqac.lif.cep.functions.Constant.duplicate | ( | boolean | with_state | ) |
Duplicates an object.
Optionally, set the object into the same state as the source object.
| with_state | Set to true to replicate the object's state, false to create a new copy in the initial state. |
Reimplemented from ca.uqac.lif.cep.functions.Function.
Definition at line 101 of file Constant.java.
| void ca.uqac.lif.cep.functions.Constant.evaluate | ( | Object[] | inputs, |
| Object[] | outputs ) |
Evaluates the outputs of the function, given some inputs.
| inputs | The arguments of the function. The size of the array should be equal to the function's declared input arity. |
| outputs | The outputs of the function. The size of the array should be equal to the function's declared output arity. @ Any exception that may occur during the evaluation of a function |
Reimplemented from ca.uqac.lif.cep.functions.Function.
Definition at line 70 of file Constant.java.
| void ca.uqac.lif.cep.functions.Constant.evaluate | ( | Object[] | inputs, |
| Object[] | outputs, | ||
| Context | context, | ||
| EventTracker | tracker ) |
Evaluates the outputs of the function, given some inputs.
| inputs | The arguments of the function. The size of the array should be equal to the function's declared input arity. |
| outputs | The outputs of the function. The size of the array should be equal to the function's declared output arity. |
| context | The context in which the evaluation is done. If the function's arguments contains placeholders, they will be replaced by the corresponding object fetched from this map before evaluating the function |
| tracker | An event tracker to record associations between inputs and outputs. This argument is optional and may be null. |
Reimplemented from ca.uqac.lif.cep.functions.Function.
Definition at line 60 of file Constant.java.
| boolean ca.uqac.lif.cep.functions.Constant.evaluatePartial | ( | Object[] | inputs, |
| Object[] | outputs, | ||
| Context | context ) |
Evaluates the outputs of the function, given some inputs.
| inputs | The arguments of the function. The size of the array should be equal to the function's declared input arity. |
| outputs | The outputs of the function. The size of the array should be equal to the function's declared output arity. |
| context | The context in which the evaluation is done. If the function's arguments contains placeholders, they will be replaced by the corresponding object fetched from this map before evaluating the function |
true if the function succeeded in producing an output value, false otherwise Reimplemented from ca.uqac.lif.cep.functions.Function.
Definition at line 76 of file Constant.java.
| int ca.uqac.lif.cep.functions.Constant.getInputArity | ( | ) |
Gets the function's input arity, i.e.
the number of arguments it takes.
Reimplemented from ca.uqac.lif.cep.functions.Function.
Definition at line 83 of file Constant.java.
| void ca.uqac.lif.cep.functions.Constant.getInputTypesFor | ( | Set< Class<?> > | classes, |
| int | index ) |
Populates the set of classes accepted by the function for its i-th input.
| classes | The set of to fill with classes |
| index | The index of the input to query |
Reimplemented from ca.uqac.lif.cep.functions.Function.
Definition at line 107 of file Constant.java.
| int ca.uqac.lif.cep.functions.Constant.getOutputArity | ( | ) |
Gets the function's output arity, i.e.
the number of elements it outputs. (We expect that most functions will have an output arity of 1.)
Reimplemented from ca.uqac.lif.cep.functions.Function.
Definition at line 89 of file Constant.java.
| Class<?> ca.uqac.lif.cep.functions.Constant.getOutputTypeFor | ( | int | index | ) |
Returns the type of the events produced by the function for its i-th output.
| index | The index of the output to query |
Reimplemented from ca.uqac.lif.cep.functions.Function.
Definition at line 114 of file Constant.java.
| Object ca.uqac.lif.cep.functions.Constant.getValue | ( | ) |
Gets the actual object that this constant processor returns.
Definition at line 134 of file Constant.java.
| Object ca.uqac.lif.cep.functions.Constant.printState | ( | ) |
Reimplemented from ca.uqac.lif.cep.functions.Function.
Definition at line 143 of file Constant.java.
| Constant ca.uqac.lif.cep.functions.Constant.readState | ( | Object | o | ) |
Reimplemented from ca.uqac.lif.cep.functions.Function.
Definition at line 152 of file Constant.java.
| void ca.uqac.lif.cep.functions.Constant.reset | ( | ) |
Resets the function to its initial state.
In the case of a stateless function, nothing requires to be done.
Reimplemented from ca.uqac.lif.cep.functions.Function.
Definition at line 95 of file Constant.java.
| String ca.uqac.lif.cep.functions.Constant.toString | ( | ) |
Definition at line 120 of file Constant.java.
A constant representing the number one.
Definition at line 40 of file Constant.java.
A constant representing the number zero.
Definition at line 35 of file Constant.java.