Package ca.uqac.lif.cep.fol
Class PredicateGet
- java.lang.Object
-
- ca.uqac.lif.cep.functions.Function
-
- ca.uqac.lif.cep.functions.UnaryFunction<PredicateTuple,java.lang.Object>
-
- ca.uqac.lif.cep.fol.PredicateGet
-
- All Implemented Interfaces:
ca.uqac.lif.azrael.Printable
,ca.uqac.lif.azrael.Readable
,ca.uqac.lif.cep.Duplicable
,ca.uqac.lif.cep.functions.DuplicableFunction
public class PredicateGet extends ca.uqac.lif.cep.functions.UnaryFunction<PredicateTuple,java.lang.Object>
Extracts the value at a specific position in the predicate tuple.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_position
The position to extract from each tuple
-
Constructor Summary
Constructors Constructor Description PredicateGet(int position)
Creates an instance of the function
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PredicateGet
duplicate(boolean with_state)
java.lang.Object
getValue(PredicateTuple x)
-
Methods inherited from class ca.uqac.lif.cep.functions.UnaryFunction
evaluate, getInputArity, getInputTypesFor, getOutputArity, getOutputTypeFor, reset
-
-
-
-
Constructor Detail
-
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 valuenull
will be returned if the index is out of bounds with respect to the tuple being given.
-
-
Method Detail
-
getValue
public java.lang.Object getValue(PredicateTuple x)
- Specified by:
getValue
in classca.uqac.lif.cep.functions.UnaryFunction<PredicateTuple,java.lang.Object>
-
duplicate
public PredicateGet duplicate(boolean with_state)
- Specified by:
duplicate
in interfaceca.uqac.lif.cep.Duplicable
- Overrides:
duplicate
in classca.uqac.lif.cep.functions.UnaryFunction<PredicateTuple,java.lang.Object>
-
-