Interface ConstOnlySubstitution
- All Superinterfaces:
Substitution
- All Known Implementing Classes:
ClauseSubstitution
,SimpleConstSubstitution
A mapping from variables to constants. This is a restriction of a more general substitution,
which is from variables to terms.
-
Method Summary
Methods inherited from interface edu.harvard.seas.pl.abcdatalog.util.substitution.Substitution
apply
-
Method Details
-
get
Retrieves the mapping of a variable.- Specified by:
get
in interfaceSubstitution
- Parameters:
x
- the variable- Returns:
- the constant that the variable is bound to, or null if the variable is not in the substitution
-
add
Attempts to add a mapping to the substitution. Returns true if the mapping was made successfully (i.e., if the variable was not already mapped to another constant).- Parameters:
x
- the variablec
- the constant- Returns:
- whether the mapping was successfully added
-