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 listZconsists of the elements of the listYfor which the goalXcan be successfully applied.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSubList.PreprocessedSubList
-
Constructor Summary
Constructors Constructor Description SubList()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanevaluate(Term partiallyAppliedFunction, Term args, Term filteredOutput)private static booleanevaluateSubList(PredicateFactory pf, Term partiallyAppliedFunction, Term args, Term filteredOutput)private booleanisValidArguments(Term partiallyAppliedFunction, Term arg)PredicateFactorypreprocess(Term term)-
Methods inherited from class org.projog.core.predicate.AbstractSingleResultPredicate
evaluate, evaluate, evaluate, evaluate, evaluate, getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, init, isRetryable, setKnowledgeBase
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.projog.core.predicate.PredicateFactory
getPredicate, isAlwaysCutOnBacktrack, isRetryable
-
-
-
-
Method Detail
-
evaluate
protected boolean evaluate(Term partiallyAppliedFunction, Term args, Term filteredOutput)
- Overrides:
evaluatein classAbstractSingleResultPredicate
-
evaluateSubList
private static boolean evaluateSubList(PredicateFactory pf, Term partiallyAppliedFunction, Term args, Term filteredOutput)
-
preprocess
public PredicateFactory preprocess(Term term)
- Specified by:
preprocessin interfacePreprocessablePredicateFactory
-
-