Class Nth
java.lang.Object
org.projog.core.predicate.AbstractPredicateFactory
org.projog.core.predicate.builtin.list.Nth
- All Implemented Interfaces:
KnowledgeBaseConsumer, PredicateFactory
nth0(X,Y,Z) / nth1(X,Y,Z) - examines an element of a list.
Indexing starts at 0 when using nth0. Indexing starts at 1 when using nth1.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractPredicateFactory
getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicate, getPredicate, getPredicate, 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
isAlwaysCutOnBacktrack
-
Field Details
-
startingIdx
private final int startingIdx
-
-
Constructor Details
-
Nth
private Nth(int startingIdx)
-
-
Method Details
-
nth0
-
nth1
-
getPredicate
- Overrides:
getPredicatein classAbstractPredicateFactory
-
evaluate
-