public interface Predicate
| Modifier and Type | Method and Description |
|---|---|
boolean |
couldReevaluationSucceed()
Could the next re-evaluation of this instance succeed?
|
boolean |
evaluate()
Attempts to satisfy the goal this instance represents.
|
boolean evaluate()
Calling this method multiple times on a single instance allows all possible answers to be identified. An attempt to find a solution carries on from where the last successful call finished.
If PredicateFactory.isRetryable() returns false then this method should only be called once per
individual query (no attempt should be made to find alternative solutions).
If PredicateFactory.isRetryable() returns true then, in order to find all possible solutions for
an individual query, this method should be recalled on backtracking until it returns false.
true if it was possible to satisfy the clause, false otherwisePredicateFactory.getPredicate(Term[])boolean couldReevaluationSucceed()
Specifies whether a specific instance of a specific implementation of Predicate, that has already had
evaluate() called on it at least once, could possibly return true the next time
evaluate() is called on it. i.e. is it worth trying to continue to find solutions for the specific query
this particular instance represents and has been evaluating?
(Note: the difference between this method and PredicateFactory.isRetryable() is that
PredicateFactory.isRetryable() deals with whether, in general, a specific implementation (rather
than instance) of Predicate could ever produce multiple answers for an individual query.)
true if an attempt to re-evaluate this instance could possible succeed, false otherwiseCopyright © 2024. All rights reserved.