0.11.4
ca.uqac.lif.cep.functions.Variable Class Referenceabstract

Detailed Description

A function that acts as a placeholder for a value to be computed at a later time.

Author
Sylvain Hallé
Since
0.3

Definition at line 28 of file Variable.java.

Public Member Functions

 Variable ()
 Creates a new placeholder.
void evaluate (Object[] inputs, Object[] outputs)
 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.
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.
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.
abstract void evaluate (Object[] inputs, Object[] outputs, Context context, EventTracker tracker)
 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.
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.
abstract Function duplicate (boolean with_state)
 Duplicates an object.
Object print (ObjectPrinter<?> printer)
final Function read (ObjectReader<?> reader, Object o) throws FunctionException
 Reads the content of a function from a serialized object.

Additional Inherited Members

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.
Protected Member Functions inherited from ca.uqac.lif.cep.functions.Function
Object printState ()
 Produces an object that represents the state of the current function.
Function readState (Object o)
 Reads the state of a function and uses it to create a new instance.

Constructor & Destructor Documentation

◆ Variable()

ca.uqac.lif.cep.functions.Variable.Variable ( )

Creates a new placeholder.

Definition at line 33 of file Variable.java.

Member Function Documentation

◆ evaluate()

void ca.uqac.lif.cep.functions.Variable.evaluate ( Object[] inputs,
Object[] outputs )

Evaluates the outputs of the function, given some inputs.

Parameters
inputsThe arguments of the function. The size of the array should be equal to the function's declared input arity.
outputsThe 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 39 of file Variable.java.

◆ getInputArity()

int ca.uqac.lif.cep.functions.Variable.getInputArity ( )

Gets the function's input arity, i.e.

the number of arguments it takes.

Returns
The input arity

Reimplemented from ca.uqac.lif.cep.functions.Function.

Definition at line 45 of file Variable.java.

◆ getInputTypesFor()

void ca.uqac.lif.cep.functions.Variable.getInputTypesFor ( Set< Class<?> > classes,
int index )

Populates the set of classes accepted by the function for its i-th input.

Parameters
classesThe set of to fill with classes
indexThe index of the input to query

Reimplemented from ca.uqac.lif.cep.functions.Function.

Definition at line 63 of file Variable.java.

◆ getOutputArity()

int ca.uqac.lif.cep.functions.Variable.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.)

Returns
The output arity

Reimplemented from ca.uqac.lif.cep.functions.Function.

Definition at line 51 of file Variable.java.

◆ getOutputTypeFor()

Class<?> ca.uqac.lif.cep.functions.Variable.getOutputTypeFor ( int index)

Returns the type of the events produced by the function for its i-th output.

Parameters
indexThe index of the output to query
Returns
The type of the output

Reimplemented from ca.uqac.lif.cep.functions.Function.

Definition at line 69 of file Variable.java.

◆ reset()

void ca.uqac.lif.cep.functions.Variable.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 57 of file Variable.java.


The documentation for this class was generated from the following file:
  • /home/sylvain/Workspaces/beepbeep/core/src/ca/uqac/lif/cep/functions/Variable.java