Package edu.uky.ai.logic
Class Term
java.lang.Object
edu.uky.ai.logic.Term
- All Implemented Interfaces:
Formula
,Comparable<Formula>
A term is a reference to an individual thing in the world, and does not have
a truth value. Terms have types, which define groups of similar things. Two
terms are considered to refer to the same thing (i.e. are
equals(Object)
) if they have the same type and same name.- Author:
- Stephen G. Ware
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
substitute
(Substitution substitution) Returns a version of this formula such that any elements that appear in the given substitution are replaced.toString()
Finds the bindings that would be necessary to make this formula the same as another formula (if any exist).
-
Field Details
-
DEFAULT_TYPE
The default type. All terms are considered to be of this type.- See Also:
-
type
The term's type. All terms are of theDEFAULT_TYPE
and may also be of one additional type as defined by this string. -
name
The thing's name
-
-
Constructor Details
-
Term
Constructs a term from the given type and name.- Parameters:
type
- the term's typename
- the term's name
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
toString
-
substitute
Description copied from interface:Formula
Returns a version of this formula such that any elements that appear in the given substitution are replaced.- Specified by:
substitute
in interfaceFormula
- Parameters:
substitution
- the substitution- Returns:
- a formula with replacements from the substitution
-
unify
Description copied from interface:Formula
Finds the bindings that would be necessary to make this formula the same as another formula (if any exist).
-