|
Orbital library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface Substitution.Matcher
Interface for matching and replacing elementary terms within a substitution.
Instances of this interface provide the functionality of an
elementary replacement x2->t2
of a substitution
σ = [x1->t1,x2->t2,...,xn->tn].
The matcher is called by the Substitution to check
whether a given term matches it, and can then be used
to replace the matched term with another term, if required.
Hence, the substitution is the inductive homomorphic continuation
of its elementary replacements.
Substitutions.createExactMatcher(Object, Object),
Substitutions.createExactMatcher(Object),
Substitutions.createSingleSidedMatcher(Object, Object),
Substitutions.createSingleSidedMatcher(Object, Object, orbital.logic.functor.Predicate),
Substitutions.createSingleSidedMatcher(Object)| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Whether this matcher equals another. |
int |
hashCode()
|
boolean |
matches(java.lang.Object t)
Attempts to match t against this. |
java.lang.Object |
pattern()
Get the pattern descriptor. |
java.lang.Object |
replace(java.lang.Object t)
Replace a matched term. |
| Method Detail |
|---|
boolean equals(java.lang.Object o)
Note that it is usually safe to compare for type and pattern only, regardless of the substitute. But carefully avoid using "substitutions" with multiple replacements specified for a single pattern.
equals in class java.lang.Objectint hashCode()
hashCode in class java.lang.Objectjava.lang.Object pattern()
boolean matches(java.lang.Object t)
java.lang.Object replace(java.lang.Object t)
t - the term matched per matches(Object).
|
Orbital library 1.2.0: 23 Apr 2008 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||