Package edu.uky.ai.logic
Class Variable
java.lang.Object
edu.uky.ai.logic.Term
edu.uky.ai.logic.Variable
- All Implemented Interfaces:
Formula
,Comparable<Formula>
A variable represents a placeholder for a
Term
.- Author:
- Stephen G. Ware
-
Field Summary
Fields inherited from class edu.uky.ai.logic.Term
DEFAULT_TYPE, name, type
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class edu.uky.ai.logic.Term
equals, hashCode, substitute, unify
-
Constructor Details
-
Variable
Constructs a new variable with the given type and name.- Parameters:
type
- the type of the variablename
- the name of the variable
-
-
Method Details
-
toString
-
isGround
public boolean isGround()Description copied from interface:Formula
Checks whether this formula contains any variables.- Returns:
- true if the formula is ground, false otherwise
-
makeUnique
Returns a new variable object with the same type and a name which is similar to this variable's name but guaranteed to be unique (i.e. no other variable has the same name).- Returns:
- a uniquely named variable of the same type
-