Package ca.uqac.lif.cep.fol
Class PredicateGet
java.lang.Object
ca.uqac.lif.cep.functions.Function
ca.uqac.lif.cep.functions.UnaryFunction<PredicateTuple,Object>
ca.uqac.lif.cep.fol.PredicateGet
- All Implemented Interfaces:
ca.uqac.lif.cep.Duplicable,ca.uqac.lif.cep.functions.DuplicableFunction
Extracts the value at a specific position in the predicate tuple.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe position to extract from each tupleFields inherited from class ca.uqac.lif.cep.functions.Function
s_maxInputArity -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ca.uqac.lif.cep.functions.UnaryFunction
evaluate, getInputArity, getInputTypesFor, getOutputArity, getOutputTypeFor, resetMethods inherited from class ca.uqac.lif.cep.functions.Function
duplicate, evaluate, evaluate, evaluateLazy, evaluatePartial, printState, readState
-
Field Details
-
m_position
protected int m_positionThe position to extract from each tuple
-
-
Constructor Details
-
PredicateGet
public PredicateGet(int position) Creates an instance of the function- Parameters:
position- The position to extract in a tuple. Ifposition= 0, the name of the predicate tuple will be returned. Otherwise, the value at indexposition-1 in the arguments will be returned. The valuenullwill be returned if the index is out of bounds with respect to the tuple being given.
-
-
Method Details
-
getValue
- Specified by:
getValuein classca.uqac.lif.cep.functions.UnaryFunction<PredicateTuple,Object>
-
duplicate
- Specified by:
duplicatein interfaceca.uqac.lif.cep.Duplicable- Overrides:
duplicatein classca.uqac.lif.cep.functions.UnaryFunction<PredicateTuple,Object>
-