Package edu.uky.ai.logic
Class HashSubstitution
java.lang.Object
edu.uky.ai.logic.HashSubstitution
- All Implemented Interfaces:
Substitution,Cloneable
A substitution which uses a
HashMap to keep track of
substitutions.- Author:
- Stephen G. Ware
-
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructs a new, empty hash substitution.protectedHashSubstitution(HashSubstitution toClone) Constructs a new hash substitution which is a clone of the given substitution. -
Method Summary
-
Constructor Details
-
HashSubstitution
Constructs a new hash substitution which is a clone of the given substitution.- Parameters:
toClone- the substitution to clone
-
HashSubstitution
public HashSubstitution()Constructs a new, empty hash substitution.
-
-
Method Details
-
get
Description copied from interface:SubstitutionDefines what a given formula should be replaced with.- Specified by:
getin interfaceSubstitution- Parameters:
original- the formula which may be replaced- Returns:
- the replacement formula, or the original formula if no replacement is defined
-
set
Specifies that a given formula should be replaced with another formula.- Parameters:
original- the formula to be replacedreplacement- the formula that will replace it
-
clone
-