public abstract class Predicate extends Object
Modifier | Constructor and Description |
---|---|
protected |
Predicate(String name,
ConstantType[] types) |
protected |
Predicate(String name,
ConstantType[] types,
boolean checkName) |
Modifier and Type | Method and Description |
---|---|
static void |
clearForTesting()
Clear out all active predicates.
|
static Predicate |
get(String name) |
ConstantType |
getArgumentType(int position)
Returns the ArgumentType which a
Term must have to be a valid
argument for a particular argument position of this Predicate. |
int |
getArity()
Returns the number of
Terms that are related when using this Predicate. |
String |
getName()
Returns the name of this Predicate.
|
String |
toString() |
protected Predicate(String name, ConstantType[] types)
protected Predicate(String name, ConstantType[] types, boolean checkName)
public String getName()
public int getArity()
Terms
that are related when using this Predicate.
In other words, the arity of a Predicate is the number of arguments it accepts.
For example, the Predicate Related(A, B) has an arity of 2.public ConstantType getArgumentType(int position)
Term
must have to be a valid
argument for a particular argument position of this Predicate.public static void clearForTesting()
Copyright © 2018 University of California, Santa Cruz. All rights reserved.