Package ca.uqac.lif.cep.fol
Class Predicate
java.lang.Object
ca.uqac.lif.cep.functions.Function
ca.uqac.lif.cep.fol.Predicate
- All Implemented Interfaces:
ca.uqac.lif.cep.Duplicable,ca.uqac.lif.cep.functions.DuplicableFunction
public class Predicate
extends ca.uqac.lif.cep.functions.Function
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classSpecial constant that can be used when evaluating a predicate to indicate a "don't care" value -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String[]The predicate's domain name for each of its argumentsprotected StringThe predicate's nameFields inherited from class ca.uqac.lif.cep.functions.Function
s_maxInputArity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDefinition(Predicate.PredicateArgument arguments, boolean value) Adds a new tuple to the definition of this predicatevoidclear()duplicate(boolean with_state) voidString[]intvoidgetInputTypesFor(Set<Class<?>> classes, int index) intClass<?> getOutputTypeFor(int index) voidreset()toString()voidupdateDefinition(PredicateTuple tuple) voidupdateDefinition(Object[] inputs, boolean value) Methods inherited from class ca.uqac.lif.cep.functions.Function
duplicate, evaluate, evaluate, evaluateLazy, evaluatePartial, printState, readState
-
Field Details
-
m_name
The predicate's name -
m_domainNames
The predicate's domain name for each of its arguments
-
-
Constructor Details
-
Predicate
Creates a new predicate- Parameters:
name- The name of the predicatedomain_names- The name of the domains for each of its arguments
-
Predicate
Creates a new predicate by copying its contents from another predicate- Parameters:
pred- The predicate to copy from
-
-
Method Details
-
addDefinition
Adds a new tuple to the definition of this predicate- Parameters:
arguments- The argumentsvalue- The value associated to these arguments
-
updateDefinition
-
updateDefinition
-
getDomainNames
-
clear
public void clear() -
toString
-
evaluate
- Specified by:
evaluatein classca.uqac.lif.cep.functions.Function
-
getInputArity
public int getInputArity()- Specified by:
getInputArityin classca.uqac.lif.cep.functions.Function
-
getOutputArity
public int getOutputArity()- Specified by:
getOutputArityin classca.uqac.lif.cep.functions.Function
-
reset
public void reset()- Overrides:
resetin classca.uqac.lif.cep.functions.Function
-
duplicate
- Specified by:
duplicatein interfaceca.uqac.lif.cep.Duplicable- Specified by:
duplicatein classca.uqac.lif.cep.functions.Function
-
getInputTypesFor
- Specified by:
getInputTypesForin classca.uqac.lif.cep.functions.Function
-
getOutputTypeFor
- Specified by:
getOutputTypeForin classca.uqac.lif.cep.functions.Function
-