@FunctionalInterface
public interface Substitution
| Modifier and Type | Method and Description |
|---|---|
Expression |
getSubstitution(VariableExpression expr)
Indicates what the given expr shall be replaced with.
|
static Substitution |
join(Substitution... subs)
Returns a substitution that falls back to the given substitutions if this substitution doesn't have a value.
|
default Substitution |
join(Substitution other)
Returns a substitution that falls back to the given substitution if this substitution doesn't have a value.
|
static Substitution |
joinAndIgnoreNullpointers(Substitution... subs)
Returns a substitution that falls back to the given substitutions if this substitution doesn't have a value
and additionally ignores any
NullPointerExceptions that occur. |
static Substitution |
joinDisjoint(Substitution... subs)
Returns a new substitution that is constructed by executing a disjoint join on this substitution and the
given ones.
|
default Substitution |
joinDisjoint(Substitution other)
Returns a substitution that gets its entries from this substitution or the given one.
|
Expression getSubstitution(VariableExpression expr)
expr - the candidate expression to replacedefault Substitution joinDisjoint(Substitution other)
IllegalArgumentException if both this substitution
and the given one return non-null on the same input, i.e. they are not disjoint.other - the substitution to execute the disjoint join withdefault Substitution join(Substitution other)
other - the substitution to fall back tostatic Substitution join(Substitution... subs)
subs - the substitutions to fall back tostatic Substitution joinAndIgnoreNullpointers(Substitution... subs)
NullPointerExceptions that occur.
The fallback substitutions are considered in the given order.subs - the substitutions to fall back tostatic Substitution joinDisjoint(Substitution... subs)
IllegalArgumentException if
more than one of the base substitutions has a value for a given expression.subs - the substitutions to join withjoinDisjoint(Substitution)