blob: 9b737ceb90f231e2a64ccff365520ccd5f777efd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*
* SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
*
* SPDX-License-Identifier: EPL-2.0
*/
package tools.refinery.store.query.substitution;
import tools.refinery.store.query.term.Variable;
import java.util.HashMap;
import java.util.Map;
public class RenewingSubstitution implements Substitution {
private final Map<Variable, Variable> alreadyRenewed = new HashMap<>();
@Override
public Variable getSubstitute(Variable variable) {
return alreadyRenewed.computeIfAbsent(variable, Variable::renew);
}
}
|