Interface Evaluable<R>
- Type Parameters:
R- Type returned by the evaluation
- All Known Subinterfaces:
ComputedAtom, EvaluableFunction
- All Known Implementing Classes:
ComputedAtomImpl, EvaluableFunctionImpl
public interface Evaluable<R>
Represents an object that can be evaluated with a substitution (like computed predicate or functional term)
- Author:
- Guillaume Perution-Kihli
-
Method Summary
Modifier and TypeMethodDescriptioneval(Substitution substitution) Evaluate the evaluable with a substitution The object must be evaluable with the substitution in parameter, otherwise the method will throw an exceptionGet the variables that must be sent to something to evaluate the objectbooleanisEvaluableWith(Substitution substitution) Check if we can evaluate the object with the given substitution
-
Method Details
-
eval
Evaluate the evaluable with a substitution The object must be evaluable with the substitution in parameter, otherwise the method will throw an exception- Parameters:
substitution- the substitution that associates the values to the parameters of the evaluation- Returns:
- The result of the evaluation
- Throws:
EvaluationException- if you can't use the substitution to evaluate the object
-
getMandatoryParameters
-
isEvaluableWith
Check if we can evaluate the object with the given substitution- Parameters:
substitution- the substitution that associates the values to the parameters of the evaluation- Returns:
- true iff we can evaluate this object with the given substitution
-