ubc.cs.JLog.Builtins.Entries
Class pCallPredicateEntry

java.lang.Object
  extended by ubc.cs.JLog.Parser.pPredicateEntry
      extended by ubc.cs.JLog.Builtins.Entries.pCallPredicateEntry
All Implemented Interfaces:
iName, iNameArity

public class pCallPredicateEntry
extends pPredicateEntry


Field Summary
 
Fields inherited from class ubc.cs.JLog.Parser.pPredicateEntry
arity, library, name, NARY_ARITY
 
Constructor Summary
pCallPredicateEntry()
           
 
Method Summary
 iPredicate createPredicate(jCompoundTerm cterm)
          The internal method for creating the iPredicate representation of this predicate representation.
 boolean isArity(int a)
          Tests the arity of this entry.
 
Methods inherited from class ubc.cs.JLog.Parser.pPredicateEntry
createPredicate, createPredicate, getArity, getLibrary, getName, sameLibrary, setLibrary, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

pCallPredicateEntry

public pCallPredicateEntry()
Method Detail

isArity

public boolean isArity(int a)
Description copied from class: pPredicateEntry
Tests the arity of this entry. Most predicates entries will only return true if there is an exact match, however, for n-ary predicates, arity should be set to NARY_ARITY, and isArity should always return true for supported arities.

Overrides:
isArity in class pPredicateEntry
Parameters:
a - The arity to test this entry for.
Returns:
boolean which is true if entry can be of this arity.

createPredicate

public iPredicate createPredicate(jCompoundTerm cterm)
Description copied from class: pPredicateEntry
The internal method for creating the iPredicate representation of this predicate representation. Subclasses must override. The terms are provided, already created. The caller is responsible to ensure that arity and cterm.size match.

Specified by:
createPredicate in class pPredicateEntry
Parameters:
cterm - The collection of jTerms.
Returns:
iPredicate representing this predicate and its terms.