Class SubList
java.lang.Object
org.projog.core.predicate.AbstractSingleResultPredicate
org.projog.core.predicate.builtin.list.SubList
- All Implemented Interfaces:
KnowledgeBaseConsumer, PredicateFactory, PreprocessablePredicateFactory
public final class SubList
extends AbstractSingleResultPredicate
implements PreprocessablePredicateFactory
include(X,Y,Z) - filters a list by a goal.
include(X,Y,Z) succeeds if the list Z consists of the elements of the list Y
for which the goal X can be successfully applied.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprivate static booleanevaluateSubList(PredicateFactory pf, Term partiallyAppliedFunction, Term args, Term filteredOutput) private booleanisValidArguments(Term partiallyAppliedFunction, Term arg) preprocess(Term term) Methods inherited from class AbstractSingleResultPredicate
evaluate, evaluate, evaluate, evaluate, evaluate, getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, init, isRetryable, setKnowledgeBaseMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PredicateFactory
getPredicate, isAlwaysCutOnBacktrack, isRetryable
-
Constructor Details
-
SubList
public SubList()
-
-
Method Details
-
evaluate
- Overrides:
evaluatein classAbstractSingleResultPredicate
-
evaluateSubList
private static boolean evaluateSubList(PredicateFactory pf, Term partiallyAppliedFunction, Term args, Term filteredOutput) -
isValidArguments
-
preprocess
- Specified by:
preprocessin interfacePreprocessablePredicateFactory
-